on 01-15-2019 6:02 AM
Hi all,
My purpose to modify Gruntfile.js is to:
1. write QUnit for private function, ref to https://philipwalton.com/articles/how-to-unit-test-private-functions-in-javascript/
2. We got several .css files in css folder, we want to merge all .css files into one when using grunt to build UI application for performance purpose.
My problem:
For purpose 1, I add and load "grunt-strip-code" npm module. For purpose 2, I used "grunt-concat-css" npm module.
When I tried to build my application in WebIDE, it always failed.It always throwing out the error that "No target found".
Could you kindly provide any advice for me?
Gruntfile.js
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
strip_code: {
options: {
blocks: [{
start_block: "/* test-code */",
end_block: "/* end-test-code */"
}]
// Task-specific options go here.
},
your_target: {
src: 'dist/**/*.js'
// Target-specific file lists and/or options go here.
},
}
});
grunt.loadNpmTasks('@sap/grunt-sapui5-bestpractice-build');
grunt.loadNpmTasks('grunt-strip-code');
grunt.registerTask('default', [
'lint',
'clean',
'build',
'strip_code'
]);
};
package.json
{
"name": "grunt-build",
"version": "0.0.1",
"description": "Grunt build",
"private": true,
"devDependencies": {
"@sap/grunt-sapui5-bestpractice-build": "^1.3.62",
"grunt-strip-code": "^1.0.6"
}
}
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.