diff --git a/.gitignore b/.gitignore index 9f11b75..45cb6b8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .idea/ +node_modules +build diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..53d32c3 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,72 @@ +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: { + files: { + src: 'src/*.*', + dest: 'build/', + 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']); + +}; \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..5b99db9 --- /dev/null +++ b/package.json @@ -0,0 +1,26 @@ +{ + "name": "BitwiseCmd", + "version": "1.0.0", + "description": "Bitwise Operations Console", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/BorysLevytskyi/BitwiseCmd.git" + }, + "author": "Borys Levytskyi", + "license": "MIT", + "bugs": { + "url": "https://github.com/BorysLevytskyi/BitwiseCmd/issues" + }, + "homepage": "https://github.com/BorysLevytskyi/BitwiseCmd", + "devDependencies": { + "grunt-contrib-clean": "^0.6.0", + "grunt-contrib-copy": "^0.8.0", + "grunt-contrib-cssmin": "^0.12.2", + "grunt-contrib-uglify": "^0.9.1", + "grunt-processhtml": "^0.3.7" + } +} diff --git a/css/styles.css b/src/css/styles.css similarity index 92% rename from css/styles.css rename to src/css/styles.css index 5895526..d60b899 100644 --- a/css/styles.css +++ b/src/css/styles.css @@ -1,4 +1,4 @@ -body { font-family: Verdana; font-size: 0.8em; padding: 20px 100px 0px 100px; margin: 0 } +body { font-family: Verdana; font-size: 0.8em; padding: 20px 100px 0 100px; margin: 0 } code { font-size: 1.2em; font-weight: bold; } .links { float: right; position: absolute; right: 10px; top: 10px; } @@ -33,4 +33,6 @@ code { font-size: 1.2em; font-weight: bold; } /* Dark */ .dark { background: black; color: white;} .dark .expressionInput { background: black; color: white; } -.dark a, .dark a:visited { color: white; } \ No newline at end of file +.dark a, .dark a:visited { color: white; } + +.light { background: ghostwhite; } \ No newline at end of file diff --git a/favicon.ico b/src/favicon.ico similarity index 100% rename from favicon.ico rename to src/favicon.ico diff --git a/index.html b/src/index.html similarity index 75% rename from index.html rename to src/index.html index af90911..2bfd2ae 100644 --- a/index.html +++ b/src/index.html @@ -7,31 +7,33 @@