Skip to content

Commit

Permalink
Build on prepublish and add to bin
Browse files Browse the repository at this point in the history
  • Loading branch information
KaptenJansson committed Feb 4, 2016
1 parent a62e156 commit 7437863
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 5,5 @@ node_modules/
out/
validation-report.json
validation-status.json
npm-debug.log
*~
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 1,8 @@
browsers/
firefox-*.tar.bz2
.DS_Store
node_modules/
validation-report.json
validation-status.json
npm-debug.log
*~
20 changes: 9 additions & 11 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 8,8 @@ module.exports = function(grunt) {
pkg: grunt.file.readJSON('package.json'),
browserify: {
adapterGlobalObject: {
src: ['src/js/adapter_core.js'],
dest: 'out/adapter.js',
src: ['./src/js/adapter_core.js'],
dest: './out/adapter.js',
options: {
browserifyOptions: {
// Exposes shim methods in a global object to the browser.
Expand All @@ -23,13 23,13 @@ module.exports = function(grunt) {
// Use this if you do not want adapter to expose anything to the global
// scope.
adapterAndNoGlobalObject: {
src: ['src/js/adapter_core.js'],
dest: 'out/adapter_no_global.js'
src: ['./src/js/adapter_core.js'],
dest: './out/adapter_no_global.js'
},
// Use this if you do not want MS edge shim to be included.
adapterNoEdge: {
src: ['src/js/adapter_core.js'],
dest: 'out/adapter_no_edge.js',
src: ['./src/js/adapter_core.js'],
dest: './out/adapter_no_edge.js',
options: {
// These files will be skipped.
ignore: [
Expand All @@ -48,8 48,8 @@ module.exports = function(grunt) {
// Use this if you do not want MS edge shim to be included and do not
// want adapter to expose anything to the global scope.
adapterNoEdgeAndNoGlobalObject: {
src: ['src/js/adapter_core.js'],
dest: 'out/adapter_no_edge_no_global.js',
src: ['./src/js/adapter_core.js'],
dest: './out/adapter_no_edge_no_global.js',
options: {
ignore: [
'./src/js/edge/edge_shim.js',
Expand All @@ -76,9 76,6 @@ module.exports = function(grunt) {
'excludeFiles': [
]
}
},
testling: {
files: 'test/test.js'
}
});

Expand All @@ -87,4 84,5 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-githooks');
grunt.loadNpmTasks('grunt-browserify');
grunt.registerTask('default', ['jshint', 'jscs', 'browserify']);
grunt.registerTask('build', ['browserify']);
};
16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 12,31 @@
"The WebRTC project authors (https://www.webrtc.org/)"
],
"scripts": {
"prepublish": "grunt build",
"test": "grunt && test/run-tests"
},
"testling": {
"files": "test/test.js"
"bin": [
"out/adapter.js",
"out/adapter_no_edge.js",
"out/adapter_no_edge_no_global.js",
"out/adapter_no_global.js"
]
,
"dependencies": {
"grunt": "^0.4.5",
"grunt-browserify": "^4.0.1",
"grunt-cli": ">=0.1.9"
},
"devDependencies": {
"chromedriver": "^2.16.0",
"grunt": "^0.4.5",
"grunt-browserify": "^4.0.1",
"grunt-cli": ">=0.1.9",
"grunt-contrib-jshint": "^0.11.2",
"grunt-contrib-nodeunit": "~0.4.1",
"grunt-githooks": "^0.3.1",
"grunt-jscs": "^2.0.0",
"selenium-webdriver": "^2.48.0",
"tape": "^4.0.0",
"testling": "^1.7.1",
"travis-multirunner": "^3.0.0"
}
}

0 comments on commit 7437863

Please sign in to comment.