Skip to content

Commit

Permalink
Overwritten base project files with generator-atomapp
Browse files Browse the repository at this point in the history
  • Loading branch information
ruyadorno committed Oct 28, 2014
1 parent 4e6817c commit 0761d43
Show file tree
Hide file tree
Showing 6 changed files with 176 additions and 126 deletions.
8 changes: 1 addition & 7 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# http://editorconfig.org

root = true

[*]
# Change these settings to your own preference
indent_style = space
indent_size = 4

# We recommend you to keep these unchanged
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
Expand Down
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
node_modules/
cache/
releases/
.DS_Store
.*.swp
.swp
out
node_modules
.idea
app/bower_components
45 changes: 22 additions & 23 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 4,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"white": true,
"predef": [
"define", "require"
]
"node": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"white": true,
"globals": {
"angular": true
}
}
164 changes: 117 additions & 47 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,118 @@
module.exports = function(grunt) {

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
nodewebkit: {
dev: {
options: {
app_name: 'Yeoman',
app_version: '<%= pkg["version"] %>',
build_dir: './',
mac_icns: 'img/yeoman.icns',
mac: true,
zip: true,
win: false,
linux32: false,
linux64: false,
version: '0.9.2'
},
src: [
'index.html', 'package.json', './css/*', './fonts/**/*',
'./img/**/*', './js/*'
]
},
dist: {
options: {
app_name: 'Yeoman',
app_version: '<%= pkg["version"] %>',
build_dir: './',
mac_icns: 'img/yeoman.icns',
mac: true,
win: true,
linux32: true,
linux64: true,
version: '0.9.2'
},
src: [
'index.html', 'package.json', './css/*', './fonts/**/*',
'./img/*', './js/*'
]
}
}
});

grunt.loadNpmTasks('grunt-node-webkit-builder');

grunt.registerTask('build', ['nodewebkit:dev'])
grunt.registerTask('release', ['nodewebkit:dist'])
'use strict';

module.exports = function (grunt) {

require('load-grunt-tasks')(grunt);

var atomShellVersion = '0.18.2';
var outDir = 'out';

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
'download-atom-shell': {
version: atomShellVersion,
outputDir: outDir,
rebuild: true
},
watch: {
scripts: {
options: {
livereload: true
},
files: [
'Gruntfile.js',
'app/**/*.js',
'app/**/*.html',
'app/**/*.css'
]
}
},
shell: {
mac: {
command: outDir + '/Atom.app/Contents/MacOS/Atom app'
},
linux: {
command: [
'chmod +x ' + outDir + '/atom',
outDir + '/atom app'
].join('&&')
},
win: {
command: outDir + '\\atom.exe app'
},
copyMacApp: {
command: [
'cp -a ' + outDir + ' dist',
'cp -a app/ dist/Atom.app/Contents/Resources/app'
].join('&&')
},
copyLinuxApp: {
command: [
'cp -R ' + outDir + ' dist',
'cp -R app/ dist/resources/app'
].join('&&')
},
copyWinApp: {
command: [
'echo d | xcopy /e /y /k /h ' + outDir + ' dist',
'echo d | xcopy /e /y /k /h app dist\\resources\\app'
].join('&&')
}
},
parallel: {
options: {
stream: true
},
mix: {
tasks: [
{
grunt: true,
args: ['watch']
},
{
grunt: true,
args: ['run']
}
]
}
},
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'Gruntfile.js',
'app/scripts/**/*.js'
]
}
});

grunt.registerTask('run', 'run...', function () {
if (process.platform === 'darwin') {
grunt.task.run('shell:mac');
} else if (process.platform === 'win32') {
grunt.task.run('shell:win');
} else {
grunt.task.run('shell:linux');
}
});

grunt.registerTask('dist', 'dist...', function () {
if (process.platform === 'darwin') {
grunt.task.run('shell:copyMacApp');
} else if (process.platform === 'win32') {
grunt.task.run('shell:copyWinApp');
} else {
grunt.task.run('shell:copyLinuxApp');
}
});

grunt.registerTask('init', 'init...', [
'download-atom-shell',
'jshint',
'parallel'
]);

grunt.registerTask('default', ['menu']);
};
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<link href="http://fonts.googleapis.com/css?family=Ubuntu+Mono" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>
<script src="http://localhost:35729/livereload.js"></script>
</head>
<body>
<!-- <div class="splash">
Expand Down
75 changes: 29 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,31 @@
{
"name": "yeoman-app",
"version": "0.0.0",
"description": "An app made with Node Webkit that scaffolds projects using Yeoman",
"license": "MIT",
"main": "index.html",
"author": "Zeno Rocha <[email protected]>",
"contributors": [
"Bruno Coelho <[email protected]>",
"Henrique Vicente <[email protected]>"
],
"repository": {
"type": "git",
"url": "https://github.com/zenorocha/yeoman-app"
},
"bugs": {
"url": "https://github.com/zenorocha/yeoman-app/issues"
},
"keywords": [
"yeoman",
"yo",
"scaffold"
],
"dependencies": {
"lodash": "^2.4.1",
"yeoman-environment": "1.0.2",
"generator-karma": ">=0.8.2",
"generator-mocha": "https://github.com/ruyadorno/generator-mocha/archive/patch-1.tar.gz",
"generator-angular": "0.9.8",
"generator-backbone": "0.3.3",
"generator-ember": "0.8.5",
"generator-gulp-webapp": "0.1.0",
"generator-polymer": "0.5.1"
},
"devDependencies": {
"grunt-node-webkit-builder": "0.2.2"
},
"window": {
"title": "Yeoman",
"toolbar": true,
"frame": true,
"width": 850,
"height": 635,
"min_width": 850,
"min_height": 635,
"resizable": true
}
"name": "yeoman-app",
"version": "0.0.0",
"description": "An app made with Node Webkit that scaffolds projects using Yeoman",
"author": "The Yeoman Team",
"dependencies": {
"lodash": "^2.4.1",
"yeoman-environment": "1.0.2",
"generator-karma": ">=0.8.2",
"generator-mocha": "https://github.com/ruyadorno/generator-mocha/archive/patch-1.tar.gz",
"generator-angular": "0.9.8",
"generator-backbone": "0.3.3",
"generator-ember": "0.8.5",
"generator-gulp-webapp": "0.1.0",
"generator-polymer": "0.5.1"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-download-atom-shell": "~0.8.2",
"grunt-contrib-watch": "~0.6.1",
"grunt-shell": "~0.7.0",
"grunt-parallel": "^0.3.1",
"grunt-contrib-jshint": "~0.10.0",
"grunt-menu": "^1.0.1",
"load-grunt-tasks": "~0.6.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"license": "MIT"
}

0 comments on commit 0761d43

Please sign in to comment.