Closed reacher-lu closed 9 years ago
hi pal, strange i make a local test in that way:
replace: {
dist: {
options: {
variables: {
version: '<%= pkg.version %>',
build: '<%= build %>',
product: '<%= product %>',
copyrightNotice: '<%= copyrightNotice %>',
environment: '<%= grunt.config.get(\'environment\') %>'
},
force: true
},
files: [
{expand: true, cwd: 'assets/pages', src: ['**/*.json'], dest: 'build/templates'}
]
}
},
And internal directories from assets/pages
are preserved in dest, which version of grunt / grunt-replace are you using ??
uh..the version of grunt/grunt-replace I used is too old, When I upgraded my grunt/grunt-replace ,it works very well,thank you very much!!
@outaTiME just like this issue https://github.com/outaTiME/grunt-replace/issues/67 , my problem is,
origin files
app/ ├── index1.html ├── index2.html ├── v1 │ └── 1.html │ └── 2.html
i want to replace files like this
dist/ ├── index1.html ├── index2.html ├── v1 │ └── 1.html │ └── 2.html
when i use
after run grunt, the files in dist
dist/ ├── index1.html ├── index2.html ├── 1.html ├── 2.html
How do I solve this problem? thx