Dan*_*Dan 15 gruntjs compass-sass
我Gruntfile.js包含指南针的任务:
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// FILE PATHS (custom)
dir: {
css: 'resources/styles/css',
fonts: 'resources/fonts',
html: 'resources/html',
images: 'resources/images',
includes: 'resources/includes',
node_modules: 'node_modules',
prototypes: 'resources/html/prototypes',
resources: 'resources',
scripts: 'resources/scripts',
scss: 'resources/styles/scss',
styles: 'resources/styles',
styleguide: 'resources/styleguide',
vendor: 'resources/vendor',
user: {
htdocs: '/Volumes/VR\ Mini\ Backup/Backups/Web/Active/myproject/htdocs'
}
},
// COMPASS
compass: {
dist: {
options: {
...
importPath: [
'<%= dir.user.htdocs %>/<%= dir.resources %>/vendor',
'<%= dir.user.htdocs %>/<%= dir.resources %>/fonts'
]
Run Code Online (Sandbox Code Playgroud)
指南针选项之一是importPath.这需要绝对/系统路径.一个例子importPath是/system/path/to/htdocs/resources/vendor.
由于一些开发人员将致力于我的项目,我想做出/system/path/to/htdocs动态.
有没有办法Gruntfile.js从这个文件中访问路径?
谢谢.
| 归档时间: |
|
| 查看次数: |
5523 次 |
| 最近记录: |