Quick installation
Use TrustSource with your npm projects in combination with the Grunt javascript task runner by utilizing the “ecs-grunt-plugin”. Install this plugin with a simple
npm install ecs-grunt-plugin --save-dev
on the command line within your project folder.
Create a new or extend your existing Gruntfile.js by using the provided example Gruntfile.js as a template and replace the ‘user’ and ‘apiKey’ properties with your own credentials and find a reasonable project name for the ‘project’ property.
Simply execute
grunt ecs-scan
on the command line within your project directory to scan and transfer the dependency information to the TrustSource platform.
Simple example Gruntfile.js:
'use strict';
module.exports = function (grunt) {
grunt.initConfig({
'ecs-scan': {
options: {
npm: {
project: 'YOUR PROJECT NAME'
},
user: 'YOUR LOGIN-NAME (e-mail)',
apiKey: 'YOUR API KEY',
baseUrl: 'https://app.trustsource.io'
}
}
});
grunt.loadNpmTasks("ecs-grunt-plugin");
grunt.registerTask('default', ['ecs-scan']);
};
Comments
0 comments
Please sign in to leave a comment.