add deploy process

This commit is contained in:
boryslevytskyi
2017-05-13 19:20:06 +03:00
parent 30bc69b214
commit dd0f66be9b
9 changed files with 30 additions and 109 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
.idea/
node_modules
build
BitwiseCmdPages/
.DS_Store

View File

@@ -1,85 +0,0 @@
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
files: {
'build/js/bitwisecmd.js': [
'src/js/core/core.js',
'src/js/core/is.js',
'src/js/core/should.js',
'src/js/core/di.js',
'src/js/core/appShell.js',
'src/js/core/htmlBuilder.js',
'src/js/core/observable.js',
'src/js/app.js',
// TODO: Make components to put their extensions to AppShell instead of app
'src/js/components/*.*',
'src/js/app/**/*.*'
]
}
}
},
cssmin: {
options: {
shorthandCompacting: false,
roundingPrecision: -1
},
target: {
files: {
'build/css/styles.css': ['src/css/styles.css']
}
}
},
copy: {
main: {
files: [{
src: 'src/*.*',
dest: 'build/',
flatten: true,
expand: true
}, {
src: 'src/img/*.*',
dest: 'build/img/',
flatten: true,
expand: true
}, {
src: 'src/js/analytics.js',
dest:'build/js/',
flatten: true,
expand: true
}]
}
},
processhtml: {
build: {
files: {
'build/index.html' : ['build/index.html']
}
}
},
clean: ['build/**']
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-processhtml');
grunt.loadNpmTasks('grunt-contrib-clean');
// Default task(s).
grunt.registerTask('default', ['uglify','cssmin','copy', 'processhtml']);
};

1
ds.bat
View File

@@ -1 +0,0 @@
npm run serv

17
e2e.bat
View File

@@ -1,17 +0,0 @@
pr@echo off
SET appUrl="http://localhost:13270/src/#clear"
SET confFile=e2e.chrome.js
FOR %%p IN (%*) DO (
IF [%%p] == [all] SET confFile=e2e.all.js
IF [%%p] == [build] SET appUrl="http://localhost:63342/BitwiseCmd/build/#clear"
IF [%%p] == [deploy] SET appUrl="http://bitwisecmd.com/#clear"
)
@echo on
echo "appUrl: %appUrl%"
echo "confFile: %confFile%"
protractor tests\%confFile% --params.appUrl=%appUrl%

2
e2e.sh
View File

@@ -1,2 +0,0 @@
#!/bin/bash
protractor ./tests/e2e.chrome.js --params.appUrl="http://localhost:8080"

View File

@@ -4,9 +4,12 @@
"description": "Bitwise Operations Console",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rm -rf ./build/* && cp ./src/index.html ./build && cp ./src/bundle.js ./build && cp ./src/bundle.js.map ./build && cp -r ./src/css ./build && cp -r ./src/img ./build",
"serv": "webpack-dev-server --content-base ./src",
"e2e": "protractor ./tests/e2e.chrome.js --params.appUrl='http://localhost:8080/#clear'"
"e2e": "protractor ./tests/e2e.chrome.js --params.appUrl='http://localhost:8080/#clear'",
"e2e_build": "protractor ./tests/e2e.chrome.js --params.appUrl='http://localhost:3000/#clear'",
"deploy": "rm -rf ./BitwiseCmdPages/* && cp -r ./build/* ./BitwiseCmdPages"
},
"repository": {
"type": "git",

View File

@@ -18,9 +18,8 @@ commands.initialize(cmd, appState);
console.log("appState", appState);
var hashArgs = hash.getArgs(window.location.hash);
var startupCommands = ['1','2','1|2<<2'];
var startupCommands = ['help', '1|2&6','1<<0x2a','2 4 8 16 32'];
if(hashArgs.length > 0) {
startupCommands = hashArgs;
}

21
src/bundle.js Normal file

File diff suppressed because one or more lines are too long

1
src/bundle.js.map Normal file

File diff suppressed because one or more lines are too long