MyGruntfile.jsには Compass のタスクが含まれています。
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'
]
コンパスオプションの 1 つに がありますimportPath。これには、絶対/システム パスが必要です。例importPathは/system/path/to/htdocs/resources/vendorです。
/system/path/to/htdocs複数の開発者が私のプロジェクトに取り組んでいるので、動的にしたいと考えています。
Gruntfile.jsこのファイル内からパスにアクセスする方法はありますか?
ありがとう。