mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-10 06:52:05 +01:00
add deploy process
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
|||||||
.idea/
|
.idea/
|
||||||
node_modules
|
node_modules
|
||||||
build
|
build
|
||||||
|
BitwiseCmdPages/
|
||||||
|
.DS_Store
|
||||||
|
|||||||
85
Gruntfile.js
85
Gruntfile.js
@@ -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']);
|
|
||||||
|
|
||||||
};
|
|
||||||
17
e2e.bat
17
e2e.bat
@@ -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
2
e2e.sh
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
protractor ./tests/e2e.chrome.js --params.appUrl="http://localhost:8080"
|
|
||||||
@@ -4,9 +4,12 @@
|
|||||||
"description": "Bitwise Operations Console",
|
"description": "Bitwise Operations Console",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"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",
|
"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": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -18,9 +18,8 @@ commands.initialize(cmd, appState);
|
|||||||
|
|
||||||
console.log("appState", appState);
|
console.log("appState", appState);
|
||||||
|
|
||||||
|
|
||||||
var hashArgs = hash.getArgs(window.location.hash);
|
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) {
|
if(hashArgs.length > 0) {
|
||||||
startupCommands = hashArgs;
|
startupCommands = hashArgs;
|
||||||
}
|
}
|
||||||
|
|||||||
21
src/bundle.js
Normal file
21
src/bundle.js
Normal file
File diff suppressed because one or more lines are too long
1
src/bundle.js.map
Normal file
1
src/bundle.js.map
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user