Skip to content

Commit

Permalink
configure packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ichiriac committed Jan 5, 2017
1 parent abb6a62 commit c40d287
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 5 deletions.
85 changes: 85 additions & 0 deletions gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
browserify: {
options: {
banner: '/*! <%= pkg.name %> - BSD3 License - <%= grunt.template.today("yyyy-mm-dd") %> */\n',
alias: {
'docblock-parser': './src/index.js'
}
},
dist: {
files: {
'dist/<%= pkg.name %>.js': 'index.js' // ['src/*.js', 'src/**/*.js']
}
}
},
documentation: {
parser: {
options: {
destination: "docs/",
format: "md",
version: "<%= pkg.version %>",
name: "<%= pkg.name %>",
filename: "parser.md",
shallow: false
},
files: [{
src: ['src/parser.js']
}]
},
lexer: {
options: {
destination: "docs/",
format: "md",
version: "<%= pkg.version %>",
name: "<%= pkg.name %>",
filename: "lexer.md",
shallow: false
},
files: [{
src: ['src/token.js', 'src/lexer.js']
}]
},
main: {
options: {
destination: "docs/",
format: "md",
version: "<%= pkg.version %>",
name: "<%= pkg.name %>",
filename: "README.md",
shallow: true
},
files: [{
src: ['src/index.js']
}]
}
},
uglify: {
options: {
compress: {
keep_fnames: true
},
sourceMap: true,
mangle: false,
maxLineLen: 1024
},
dist: {
src: 'dist/<%= pkg.name %>.js',
dest: 'dist/<%= pkg.name %>.min.js'
}
}
});

// Load the plugin
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-documentation');

// Default task(s).
grunt.registerTask('default', ['browserify', 'uglify']);
grunt.registerTask('doc', ['documentation']);

};
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
"version": "0.1.0",
"description": "Parses docblocks comments",
"main": "src/index.js",
"directories": {
"test": "test"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "node node_modules/mocha/bin/mocha test --stack-size=5000",
"cover": "node --stack-size=5000 node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha"
},
"repository": {
"type": "git",
Expand All @@ -25,8 +23,12 @@
"homepage": "https://github.com/glayzzle/docblock-parser#readme",
"devDependencies": {
"coveralls": "^2.11.15",
"grunt": "^1.0.1",
"grunt-browserify": "^5.0.0",
"grunt-contrib-uglify": "^2.0.0",
"grunt-documentation": "^1.2.1",
"istanbul": "^0.4.5",
"mocha": "^3.2.0",
"should": "^11.1.2"
}
}
}

0 comments on commit c40d287

Please sign in to comment.