npm install -g @angular/cli
ng new my-new-project --style=<scss|sass|less|stylus> --routing --skip-install
ng set --global packageManager=yarn
ng g component my-new-component
ng g directive my-new-directive
ng g pipe my-new-pipe
ng g service my-new-service
ng g module my-new-module
ng serve
ng serve -H 0.0.0.0
ng build
ng build --prod
ng build --prod --aot
npm install bootstrap@4.0.0-beta --save
npm install font-awesome --save
npm install jquery --save
npm install @types/jquery --save-dev
npm install --save lodash
npm install --save-dev @types/lodash
package.json
"start": "ng serve -H 0.0.0.0"
.angular-cli.json
"styles": [
"styles.styl",
"../node_modules/bootstrap/dist/css/bootstrap.css",
"../node_modules/font-awesome/css/font-awesome.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.js"
]
npm install --save-dev gulp gulp-pug
gulpfile.js
let path = require('path');
let gulp = require('gulp');
let pug = require('gulp-pug');
let pugFiles = './src/**/*.pug';
gulp.task('pug', () => {
gulp.src( pugFiles )
.pipe( pug().on('error', () => console.log('JADE ERROR')) )
.pipe( gulp.dest('./src') );
});
gulp.task('default', ['pug'], () => {
gulp.watch(pugFiles, ['pug']);
});
.gitignore
# HTML files
/src/**/*.html
!src/index.html
Change app.component.html
to app.component.pug
gulp pug