Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
bower_components
index.html
dist/
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "dependencies/jquery"]
path = dependencies/jquery
url = https://github.com/jquery/jquery.git
[submodule "dependencies/jquery.typer"]
path = dependencies/jquery.typer
url = https://github.com/yckart/jquery.typer.js.git
40 changes: 24 additions & 16 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
module.exports = function(grunt) {

var js_files = [
'bower_components/typewriter/jquery.typer.js',
'src/js/Polyfills.js',
'src/js/CmdStack.js',
'src/js/Cmd.js',
];

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
dist: {
src: js_files,
src: [
'src/js/Polyfills.js',
'src/js/CmdStack.js',
'src/js/Cmd.js',
],
dest: 'dist/js/cmd.js'
}
},
Expand Down Expand Up @@ -53,7 +49,8 @@ module.exports = function(grunt) {
}
},
dist: {
files: js_files,
//All files that exist within src/ and end in .js
files: ['src/**/*.js'],
tasks: [
'concat:dist',
'uglify'
Expand All @@ -62,19 +59,30 @@ module.exports = function(grunt) {
nospawn: true
}
}
},
copy: {
main: {
files: [
{expand: true, flatten: true, filter: 'isFile', src: ['dependencies/jquery/dist/**'], dest: 'dist/external/jquery/'},
{expand: true, flatten: true, filter: 'isFile', src: ['dependencies/jquery.typer/jquery.typer.js'], dest: 'dist/external/'},
{expand: true, src: ['example.html', 'commands.json', 'tabcomplete.json'], dest: 'dist/',
rename: function(dest, src) {
return dest + src.replace('example.html','index.html');
}
}
]
}
}
});

grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-focus');
// Load grunt tasks from NPM packages
require( "load-grunt-tasks" )( grunt );

grunt.registerTask('default', [
'concat',
'uglify',
'less:dist'
'less:dist',
'copy'
]);

grunt.registerTask('watch-all', [
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ Features
* JSON API
* Text-to-speech output (optional, where available)

Install and run demo
=====

You can build and try Cmd using npm.

npm run build
npm run start


Bower
=====
Expand Down
1 change: 1 addition & 0 deletions dependencies/jquery
Submodule jquery added at 5f35b5
1 change: 1 addition & 0 deletions dependencies/jquery.typer
Submodule jquery.typer added at 44ad35
1 change: 0 additions & 1 deletion dist/css/cmd.min.css

This file was deleted.

Loading