Skip to content

hisammy/anker_store

Repository files navigation

Anker Store Web 前端框架

主要技术框架

React Starter Kit 框架 React 库, Node.js / Express 服务器 and Flux architecture. Containing modern web development tools such as Webpack, Babel and BrowserSync. 一套高效开发,同步现时代的最新最优实现的方案.

目录布局

.
├── /build/                     # The folder for compiled output
├── /node_modules/              # 3rd-party libraries and utilities
├── /src/                       # The source code of the application
│   ├── /actions/               # Action creators that allow to trigger a dispatch to stores
│   ├── /api/                   # REST API / Relay endpoints
│   ├── /components/            # React components
│   ├── /constants/             # Constants (action types etc.)
│   ├── /content/               # Static content (plain HTML or Markdown, Jade, you name it)
│   ├── /core/                  # Core components (Flux dispatcher, base classes, utilities)
│   ├── /decorators/            # Higher-order React components
│   ├── /public/                # Static files which are copied into the /build/public folder
│   ├── /stores/                # Stores contain the application state and logic
│   ├── /utils/                 # Utility classes and functions
│   ├── /app.js                 # Client-side startup script
│   ├── /config.js              # Global application settings
│   ├── /routes.js              # Universal (isomorphic) application routes
│   ├── /server.js              # Server-side startup script
│   └── /newrelic.js            # Server-side Newrelic alert script
├── /tools/                     # Build automation scripts and utilities
│   ├── /lib/                   # Library for utility snippets
│   ├── /build.js               # Builds the project from source to output (build) folder
│   ├── /bundle.js              # Bundles the web resources into package(s) through Webpack
│   ├── /clean.js               # Cleans up the output (build) folder
│   ├── /config.js              # Webpack configuration for application bundles
│   ├── /copy.js                # Copies static files to output (build) folder
│   ├── /deploy.js              # Deploys your web application
│   ├── /serve.js               # Launches the Node.js/Express web server
│   └── /start.js               # Launches the development web server with "live reload"
│── package.json                # The list of 3rd party libraries and utilities
└── preprocessor.js             # ES6 transpiler settings for Jest

快速开始

Just clone the repo and start hacking:

$ git clone git@github.com:oceanwing/anker_store_tablet.git
$ cd anker_store_tablet
$ npm install                   # Install Node.js components listed in ./package.json
$ npm start                     # Compile and launch

构建发布

$ npm run build                 # or, `npm run build -- --release`

By default, it builds in debug mode. If you need to build in release mode, just add a -- --release flag. This will optimize the output bundle for production.

本地打包并运行

$ npm start                     # or, `npm start -- --release`

This will start a light-weight development server with "live reload" and synchronized browsing across multiple devices and browsers.

本地打包+发布到git (暂时没有使用)

$ npm run deploy                # or, `npm run deploy -- --production`

For more information see tools/deploy.js.

测试工具

Run unit tests powered by Jest with the following npm command:

$ npm test

Test any javascript module by creating a __tests__/ directory where the file is. Append -test.js to the filename and Jest will do the rest.

相关项目

相关知识

About

anker电商项目源码(Node.js, Express,, React.js, Babel 6, SCSS, Webpack, Browsersync)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published