如何用express和angular编写gruntfile
我刚开始学习Grunt,遇到了很多问题,我使用Express和Angular,我的项目目录如下如何用express和angular编写gruntfile,express,gruntjs,pug,grunt-usemin,Express,Gruntjs,Pug,Grunt Usemin,我刚开始学习Grunt,遇到了很多问题,我使用Express和Angular,我的项目目录如下 |-server |-controllers |-routes |-models |-views |-users signin.jade signup.jade index.jade //Index of server |-public |-images |-javascripts |-controllers |-se
|-server
|-controllers
|-routes
|-models
|-views
|-users
signin.jade
signup.jade
index.jade //Index of server
|-public
|-images
|-javascripts
|-controllers
|-services
|-directives
app.coffee
|-stylesheets
app.scss
|-views //Angularjs templates
gruntfile.js
server.js
//- css, will use cdn files in production
link(href='bower_cmps/normalize-css/....')
link(href='bower_cmps/bootstrap/....')
link(href='stylesheets/app.css')
//- body
.container
.row
...
//- scripts, will use cdn files in production
script(src='bower_cmps/jquery/...')
script(src='bower_cmps/angular/...')
script(src='bower_cmps/angular-ui-router/...')
script(src='javascripts/app.js')
script(src='javascripts/controllers/**.js')
script(src='javascripts/services/**.js')
我的索引.jade
可能如下
|-server
|-controllers
|-routes
|-models
|-views
|-users
signin.jade
signup.jade
index.jade //Index of server
|-public
|-images
|-javascripts
|-controllers
|-services
|-directives
app.coffee
|-stylesheets
app.scss
|-views //Angularjs templates
gruntfile.js
server.js
//- css, will use cdn files in production
link(href='bower_cmps/normalize-css/....')
link(href='bower_cmps/bootstrap/....')
link(href='stylesheets/app.css')
//- body
.container
.row
...
//- scripts, will use cdn files in production
script(src='bower_cmps/jquery/...')
script(src='bower_cmps/angular/...')
script(src='bower_cmps/angular-ui-router/...')
script(src='javascripts/app.js')
script(src='javascripts/controllers/**.js')
script(src='javascripts/services/**.js')
我使用coffeescript
编写客户端js,使用scss
编写css
Grunt
dev配置是什么样的
如何使用usemin
构建生产文件
谢谢你的提示你熟悉吗?有一堆角度+快速生成器,看看 谢谢,我现在有主意了,但是
generator angular fullstack
有一个bug,当我更改css文件时,它不会重新加载。你应该在scss
文件中进行更改,一旦检测到更改,代码将被处理为css
。是的,我知道,但我有新的