Skip to content

Commit

Permalink
Merge pull request #3 from biosis21/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Nikolay Savenko committed Apr 11, 2015
2 parents 3430d06 + 385afff commit 0bcbe3e
Show file tree
Hide file tree
Showing 207 changed files with 201 additions and 60,778 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ node_modules/
.idea/
.log*

build/
tests/reports/
client-build/
client/scripts/vendors/
63 changes: 63 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"disallowKeywordsOnNewLine": ["else"],
"disallowKeywords": ["with"],
"disallowMultipleVarDecl": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowQuotedKeysInObjects": true,
"disallowSpaceAfterObjectKeys": true,
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowSpacesInCallExpression": true,
"disallowSpacesInsideBrackets": {
"allExcept": [ "[", "]", "{", "}" ]
},
"disallowSpacesInsideParentheses": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"disallowYodaConditions": true,
"requireBlocksOnNewline": true,
"requireCapitalizedComments": true,
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireLineBreakAfterVariableAssignment": true,
"requireMultipleVarDecl": true,
"requireOperatorBeforeLineBreak": true,
"requirePaddingNewLineAfterVariableDeclaration": true,
"requirePaddingNewLinesAfterBlocks": true,
"requirePaddingNewlinesBeforeKeywords": true,
"requirePaddingNewLinesBeforeLineComments": { "allExcept": "firstAfterCurly" },
"requirePaddingNewLinesInObjects": true,
"requireSemicolons": true,
"requireSpaceAfterBinaryOperators": true,
"requireSpaceAfterKeywords": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceBeforeBlockStatements": true,
"requireSpaceBeforeKeywords": true,
"requireSpaceBeforeObjectValues": true,
"requireSpaceBetweenArguments": true,
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"requireSpacesInConditionalExpression": true,
"requireSpacesInForStatement": true,
"requireSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"requireSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"requireSpacesInFunction": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"requireSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"requireSpacesInsideObjectBrackets": "allButNested",
"safeContextKeyword": ["that"],
"validateParameterSeparator": ", "
}
20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- [Installing a new third-party library via NPM](#new-with-npm)
- [Installing a new third-party library via Bower](#new-with-bower)

### Required
### Requires

- [NodeJS](https://nodejs.org/download/) <NodeJS>

Expand All @@ -23,25 +23,19 @@

### Installation

Install **Gulp**:
Install **Gulp** and **Bower**:

```bash
$ npm install -g gulp
```

Install **Bower** and configure it:

```bash
$ npm install -g bower && bower init
$ npm install -g gulp bower
```

Install all NPM dependencies:
Install all NPM and Bower dependencies:

```bash
$ npm install
$ npm install && bower install
```

### <a href="#new-with-npm">Installing a new third-party library via NPM</a>
### Installing a new third-party library via NPM

```bash
$ npm install {--save|--save-dev} <package_name>
Expand All @@ -52,7 +46,7 @@ Learn more information about [install options](https://docs.npmjs.com/files/pack
All third-party libraries for the client-side development are located in `workspace/scripts/vendors` folder.


### <a href="#new-with-bower">Installing a new third-party library via Bower</a>
### Installing a new third-party library via Bower

```bash
$ bower install {--save|--save-dev|--production|--force-latest} <package_name>
Expand Down
5 changes: 2 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "Angular Skeleton",
"version": "0.1.2",
"name": "angular-skeleton",
"version": "0.1.3",
"authors": [
"Nikolay Savenko <biosis21@gmail.com>"
],
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
"node_modules",
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
define(function () {
"use strict";
return ['$stateProvider', function ( $stateProvider ) {
return ['$stateProvider', function ($stateProvider) {

/**
* Description all routers.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**
* @ngdoc controller
* @name App.MyModule:MyControllerCtrl
*
* @requires $scope
*
* @description
*
* @author Nikolay Savenko <biosis@gmail.com>
*/

define(function () {
"use strict";

var a = 1;
var b = 3;

return ['$scope', function ($scope) {

// $scope, myService
var z = 2;
var x = z++;


var x = {
a : 1
, bcd : 2,
ef : 'str'
};

var bbb = function () {


};

function bb () {

}

var c = [{
a: 1
}];

bb(1, 2);

if (1 == a) {
return;
}

if (a == 1) {
return;
}

if (true) { doSomething(); doSomethingElse(); }
if (true) {
doSomething();
doSomethingElse();
}

x = 1 + 2;
}];
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 0 additions & 8 deletions config/dev.json

This file was deleted.

4 changes: 3 additions & 1 deletion config/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var path = require('path');

module.exports = function () {
return require(__dirname + '\\' + (process.env.NODE_ENV || 'local') + '.json');
return require(path.join(__dirname , (process.env.NODE_ENV || 'local') + '.json'));
}();
24 changes: 12 additions & 12 deletions config/local.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"build": "./build",
"work": "./workspace",
"build": "./client-build",
"work": "./client",
"sass": {
"src": "./workspace/styles/*.scss",
"dest": "./build/styles"
"src": "./client/styles/*.scss",
"dest": "./client-build/styles"
},
"copy": {
"src": [
"./workspace/images/**/*",
"./workspace/fonts/**/*"
"./client/images/**/*",
"./client/fonts/**/*"
],
"dest": [
"./build/images",
"./build/fonts"
"./client-build/images",
"./client-build/fonts"
]
},
"server": {
Expand All @@ -21,13 +21,13 @@
"livereload": true
},
"html": {
"src": "./workspace/scripts/**/*.html",
"dest": "./build/scripts/app/templates"
"src": "./client/scripts/**/*.html",
"dest": "./client-build/scripts/app/templates"
},
"script": {
"src": [
"./workspace/scripts/**/*.js"
"./client/scripts/**/*.js"
],
"dest": "./build/"
"dest": "./client-build/"
}
}
13 changes: 8 additions & 5 deletions gulp_tasks/copy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
var gulp = require('gulp'),
watch = require('gulp-watch'),
del = require('del'),
CONFIG = require('../config');
var gulp = require('gulp'),
watch = require('gulp-watch'),
del = require('del'),
plumber = require('gulp-plumber'),
CONFIG = require('../config');

gulp.task('copy', ['clean-copy'], function () {
return gulp.src(CONFIG.copy.src, {
base: CONFIG.work
}).pipe(gulp.dest(CONFIG.build));
})
.pipe(plumber())
.pipe(gulp.dest(CONFIG.build));
});

gulp.task('watch-copy', function () {
Expand Down
13 changes: 7 additions & 6 deletions gulp_tasks/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ var gulp = require('gulp'),
templateCache = require('gulp-angular-templatecache'),
preprocess = require('gulp-preprocess'),
minifyHtml = require('gulp-minify-html'),
plumber = require('gulp-plumber'),
CONFIG = require('../config');

// TODO: will change CONFIG to PATHS

gulp.task('html', ['index-html'], function () {
return gulp.src(CONFIG.html.src)
.pipe(plumber())
.pipe(rename(function ( path ) {
path.dirname = path.dirname.replace(/(\\|\/)(modules|templates)/g, '');
return path;
Expand All @@ -29,7 +29,8 @@ gulp.task('html', ['index-html'], function () {
});

gulp.task('index-html', function () {
return gulp.src('./workspace/index.html')
return gulp.src('./client/index.html')
.pipe(plumber())
.pipe(preprocess({
context: {
isCompressed: false
Expand All @@ -39,11 +40,11 @@ gulp.task('index-html', function () {
});

gulp.task('watch-html', function () {
watch([CONFIG.html.src, './workspace/index.html'], function () {
watch([CONFIG.html.src, './client/index.html'], function () {
gulp.start('html')
});
});
/*

gulp.task('html:mini', function () {
return gulp.src(CONFIG.html.src, {
base: CONFIG.work
Expand All @@ -59,4 +60,4 @@ gulp.task('watch-html', function () {
quotes: true
}))
.pipe(gulp.dest(CONFIG.html.dest));
});*/
})
14 changes: 8 additions & 6 deletions gulp_tasks/jshint.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
var gulp = require('gulp'),
jshint = require('gulp-jshint');
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
plumber = require('gulp-plumber');

var hintPath = [
'./workspace/scripts/**/*.js',
'!./workspace/scripts/vendors/**/*'
'./client/scripts/**/*.js',
'!./client/scripts/vendors/**/*'
];

gulp.task('jshint', function() {
return gulp.src(hintPath)
.pipe(jshint())
.pipe(jshint.reporter());
.pipe(plumber())
.pipe(jshint())
.pipe(jshint.reporter());
});

gulp.task('watch-jshint', function() {
Expand Down
2 changes: 2 additions & 0 deletions gulp_tasks/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ var gulp = require('gulp'),
watch = require('gulp-watch'),
connect = require('gulp-connect'),
sourcemaps = require('gulp-sourcemaps'),
plumber = require('gulp-plumber'),
CONFIG = require('../config');

gulp.task('sass', function () {
return gulp.src(CONFIG.sass.src)
.pipe(plumber())
.pipe(sourcemaps.init())
.pipe(sass({
errLogToConsole: true
Expand Down
Loading

0 comments on commit 0bcbe3e

Please sign in to comment.