Skip to content

Commit efab28d

Browse files
author
Matt Ma
committed
Initial commit
0 parents  commit efab28d

12 files changed

+368
-0
lines changed

.editorconfig

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
8+
[*]
9+
10+
# Change these settings to your own preference
11+
indent_style = tab
12+
indent_size = 4
13+
14+
# We recommend you to keep these unchanged
15+
end_of_line = lf
16+
charset = utf-8
17+
trim_trailing_whitespace = true
18+
insert_final_newline = true
19+
20+
[*.md]
21+
trim_trailing_whitespace = false

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.gitignore

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Include your project-specific ignores in this file
2+
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files
3+
4+
# Only watch .sass file change and reset.css change
5+
# Whenever pulled the latest, need to do compass compile task
6+
7+
8+
# Numerous always-ignore extensions
9+
*.sass-cache
10+
.nodemonignore
11+
*.diff
12+
*.err
13+
*.orig
14+
*.log
15+
*.rej
16+
*.swo
17+
*.swp
18+
*.vi
19+
*~
20+
.tern-port
21+
*.css.map
22+
23+
# OS or Editor folders
24+
.DS_Store
25+
.cache
26+
.project
27+
.settings
28+
.tmproj
29+
nbproject
30+
Thumbs.db
31+
.idea/
32+
33+
# NPM packages folder.
34+
node_modules/
35+
36+
# Build folder generated by grunt
37+
build/
38+
39+
# Ignore the tracking for documentation
40+
docs/
41+
doc/
42+
43+
# Output dynamically when running the karma start, code coverage
44+
coverage/
45+
46+
# Application Ignore file
47+
compass_app_log.txt

.jshintrc

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"browser": true,
3+
"camelcase": true,
4+
"undef": true,
5+
"node": true,
6+
"es5": true,
7+
"bitwise": true,
8+
"curly": true,
9+
"eqeqeq": true,
10+
"immed": true,
11+
"indent": 4,
12+
"latedef": true,
13+
"newcap": true,
14+
"noarg": true,
15+
"quotmark": "single",
16+
"regexp": true,
17+
"unused": true,
18+
"strict": false,
19+
"trailing": true,
20+
"smarttabs": true,
21+
"evil": true,
22+
"sub": true,
23+
"boss": true,
24+
"eqnull": true,
25+
"plusplus": false,
26+
"noempty": true,
27+
"maxdepth": 4,
28+
"maxlen": 140,
29+
30+
"globals": {
31+
"global": false,
32+
"process": false,
33+
"console": false,
34+
"Buffer": false,
35+
"require": false,
36+
"__filename": false,
37+
"__dirname": false,
38+
"module": false,
39+
"exports":false,
40+
"Ember": false,
41+
"window": false,
42+
"alert": false,
43+
"$": false,
44+
"jQuery": false,
45+
"define": false,
46+
"requirejs": false,
47+
"JsSHA": false
48+
}
49+
}

.npmignore

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Numerous always-ignore extensions
2+
*.diff
3+
*.err
4+
*.orig
5+
*.log
6+
*.rej
7+
*.swo
8+
*.swp
9+
*.vi
10+
*~
11+
*.sass-cache
12+
13+
# OS or Editor folders
14+
.DS_Store
15+
.cache
16+
.project
17+
.settings
18+
.tmproj
19+
nbproject
20+
Thumbs.db
21+
22+
# NPM packages folder.
23+
node_modules/
24+
25+
# Brunch folder for temporary files.
26+
tmp/
27+
28+
# Brunch output folder.
29+
public/

LICENSE-MIT

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2014 Matt Ma
2+
3+
Permission is hereby granted, free of charge, to any person
4+
obtaining a copy of this software and associated documentation
5+
files (the "Software"), to deal in the Software without
6+
restriction, including without limitation the rights to use,
7+
copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the
9+
Software is furnished to do so, subject to the following
10+
conditions:
11+
12+
The above copyright notice and this permission notice shall be
13+
included in all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Ember Rocks
2+
3+
Launch any server or quicker application launcher
4+
5+
## Getting Started
6+
Install the module with: `npm install -g em`
7+
8+
```javascript
9+
var em = require('em');
10+
j.awesome(); // "awesome"
11+
```
12+
13+
## Documentation
14+
_(Coming soon)_
15+
16+
## Examples
17+
_(Coming soon)_
18+
19+
## Contributing
20+
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
21+
22+
## Release History
23+
_(Nothing yet)_
24+
25+
## License
26+
Copyright (c) 2014 Matt Ma
27+
Licensed under the MIT license.

bin/em

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#!/usr/bin/env node
2+
/*
3+
* commander
4+
* https://github.com/mattma/ember-rocks
5+
*
6+
* Copyright (c) 2014 Matt Ma
7+
* Licensed under the MIT license.
8+
*/
9+
10+
'use strict';
11+
12+
var program = require('commander'),
13+
create = require('../src/commands/new'),
14+
pkg = require('../package.json');
15+
16+
var output, outputStdout;
17+
18+
outputStdout = function(data) {
19+
console.log(data.toString('utf8').trim());
20+
};
21+
22+
output = function(proc) {
23+
proc.stdout.on('data', function(data) {
24+
return outputStdout(data);
25+
});
26+
proc.stderr.on('data', function(data) {
27+
return outputStdout(data);
28+
});
29+
};
30+
31+
program
32+
.version('em-cli ' + pkg.version)
33+
.usage("[command] [options]\n\n Command-Specific Help\n\n em [command] --help");
34+
35+
program
36+
.command('new')
37+
.description('creates a new ember application at [dirName]')
38+
.usage('[dirName] \n Ex: em new my-app')
39+
.action(create);
40+
41+
// must be before .parse() since node's emit() is immediate
42+
program.on('--help', function(){
43+
console.log(' Examples:');
44+
console.log('');
45+
console.log(' $ em new [dirName] # create a brand new Ember Application');
46+
console.log('');
47+
});
48+
49+
program.parse(process.argv);
50+
51+
52+
// resolve('rocks', {
53+
// basedir: process.cwd()
54+
// }, function(error, projectLocalCli) {
55+
// var cli;
56+
// if (error) {
57+
// // If there is an error, resolve could not find the ember-cli
58+
// // library from a package.json. Instead, include it from a relative
59+
// // path to this script file (which is likely a globally installed
60+
// // npm package). Most common cause for hitting this is `ember new`
61+
// cli = require('../lib/cli');
62+
// } else {
63+
// // No error implies a projectLocalCli, which will load whatever
64+
// // version of ember-cli you have installed in a local package.json
65+
// cli = require(projectLocalCli);
66+
// }
67+
68+
// cli({
69+
// cliArgs: process.argv.slice(2),
70+
// inputStream: process.stdin,
71+
// outputStream: process.stdout
72+
// }).then(process.exit);
73+
// });
74+

config.rb

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Get the directory that this configuration file exists in
2+
curDir = File.dirname(__FILE__)
3+
dir = File.join( curDir, 'YOUR_APP_NAME' )
4+
5+
# Load the sencha-touch framework automatically.
6+
load File.join(dir, 'touch', 'resources', 'themes')
7+
8+
# Compass configurations
9+
sass_path = File.join(dir, 'resources', 'sass')
10+
css_path = File.join(dir, 'resources', 'css')
11+
fonts_dir = File.join(dir, 'resources', 'sass', 'stylesheets', 'fonts')
12+
13+
# Require any additional compass plugins here.
14+
images_dir = File.join(dir, 'resources', 'images')
15+
16+
output_style = :compressed
17+
environment = :production

package.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "EmberRocks",
3+
"description": "An Ember CLI tool to build an ambitious web application",
4+
"version": "0.0.1",
5+
"homepage": "http://mattmadesign.com",
6+
"author": {
7+
"name": "Matt Ma",
8+
"email": "[email protected]",
9+
"url": "http://mattmadesign.com"
10+
},
11+
"repository": {
12+
"type": "git",
13+
"url": "git://github.com/mattma/ember-rocks.git"
14+
},
15+
"bugs": {
16+
"url": "https://github.com/mattma/ember-rocks/issues"
17+
},
18+
"licenses": [
19+
{
20+
"type": "MIT",
21+
"url": "https://github.com/mma/ember-rocks/blob/master/LICENSE-MIT"
22+
}
23+
],
24+
"main": "bin/em",
25+
"preferGlobal": "true",
26+
"bin": {
27+
"em": "bin/em"
28+
},
29+
"engines": {
30+
"node": ">=0.10.0"
31+
},
32+
"scripts": {
33+
"test": "n"
34+
},
35+
"dependencies": {},
36+
"devDependencies": {
37+
"commander": "^2.2.0"
38+
},
39+
"keywords": []
40+
}

src/commands/new.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
var create = function(dirName, options) {
2+
console.log('should create a new app folder');
3+
console.log('dirName: ', dirName);
4+
console.log('options: ', options);
5+
};
6+
7+
module.exports = create;

test/rocks_test.js

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
var j = require('../lib/rocks.js');
2+
3+
/*
4+
======== A Handy Little Nodeunit Reference ========
5+
https://github.com/caolan/nodeunit
6+
7+
Test methods:
8+
test.expect(numAssertions)
9+
test.done()
10+
Test assertions:
11+
test.ok(value, [message])
12+
test.equal(actual, expected, [message])
13+
test.notEqual(actual, expected, [message])
14+
test.deepEqual(actual, expected, [message])
15+
test.notDeepEqual(actual, expected, [message])
16+
test.strictEqual(actual, expected, [message])
17+
test.notStrictEqual(actual, expected, [message])
18+
test.throws(block, [error], [message])
19+
test.doesNotThrow(block, [error], [message])
20+
test.ifError(value)
21+
*/
22+
23+
exports.awesome = {
24+
setUp: function(done) {
25+
// setup here
26+
done();
27+
},
28+
'no args': function(test) {
29+
test.expect(1);
30+
// tests here
31+
test.equal(j.awesome(), 'awesome', 'should be awesome.');
32+
test.done();
33+
},
34+
};

0 commit comments

Comments
 (0)