A CLI tool for booting modernized AngularJS projects.
(Inspired by vue-cli and Create React App, special thanks to Babel and Webpack)
Pillow works on macOS, Windows, and Linux.
If something doesnβt work, please file an issue.
Pillow creates project based on pillow-boilerplate. Do not hesitate to file an issue, if you want more features support.
Quick Overview
npm install -g pillow-cli
pillow my-app
cd my-app
npm install
npm start
Then open http://localhost:3000/ to see your app.
When youβre ready to deploy to production, create a minified bundle with npm run build
.
Getting Started
Installation
Install it once globally:
npm install -g pillow-cli
Youβll need to have Node >= 6 on your machine. You can use nvm to easily switch Node versions between different projects.
Creating an App
To create a new app, run:
pillow my-app
cd my-app
It will create a directory called my-app
inside the current folder.
Inside that directory, it will generate the initial project structure:
my-app
βββ build/ # webpack config files
β βββ ...
βββ config/
β βββ index.js # project config
β βββ ...
βββ src/
β βββ app.js # app entry file
β βββ app.routes.js # app route
β βββ main/ # main module
β β βββ components # main module ui components
β β βββ services # main module services
β β βββ views # main module page views
β β βββ index.js # main module entry file
β β βββ main.routes.js # main module route(If use router)
β βββ modules/ # location for other modules
β βββ ...
βββ static/ # pure static assets (directly copied)
βββ .babelrc # babel config
βββ .postcssrc.js # postcss config
βββ .eslintrc.js # eslint config
βββ .editorconfig # editor config
βββ index.template.html # index.html template
βββ package.json # build scripts and dependencies
Before you start, you need install dependencies by running:
npm install
Once the installation is done, you can run some commands inside the project folder:
npm start
or yarn start
Runs the app in development mode.
Open http://localhost:3000 to view it in the browser.
The page will automatically reload if you make changes to the code.
You will see the build errors and lint warnings in the console and browser.
npm run build
or yarn build
Builds the app for production to the dist
folder.
It correctly bundles AngularJS in production mode and optimizes the build for the best performance.
Your app is ready to be deployed.
License
MIT Β© Simon Liu