Skip to content
This repository was archived by the owner on Mar 26, 2022. It is now read-only.

Commit a57ee70

Browse files
committed
Added my similar project to get started
1 parent 3342129 commit a57ee70

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+5934
-0
lines changed

.DS_Store

6 KB
Binary file not shown.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Shalom
22
Angular 1 Starter Client for Sayonara JS.Focuses on a Portfolio-like Design
3+
4+
5+
**Generated From:** [Yeoman Fountain Generator](https://github.com/FountainJS/generator-fountain-angular1)

conf/browsersync-dist.conf.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const conf = require('./gulp.conf');
2+
3+
module.exports = function () {
4+
return {
5+
server: {
6+
baseDir: [
7+
conf.paths.dist
8+
]
9+
},
10+
open: false
11+
};
12+
};

conf/browsersync.conf.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const conf = require('./gulp.conf');
2+
3+
module.exports = function () {
4+
return {
5+
server: {
6+
baseDir: [
7+
conf.paths.tmp,
8+
conf.paths.src
9+
]
10+
},
11+
open: false
12+
};
13+
};

conf/gulp.conf.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
'use strict';
2+
3+
/**
4+
* This file contains the variables used in other gulp files
5+
* which defines tasks
6+
* By design, we only put there very generic config values
7+
* which are used in several places to keep good readability
8+
* of the tasks
9+
*/
10+
11+
const path = require('path');
12+
const gutil = require('gulp-util');
13+
14+
exports.ngModule = 'app';
15+
16+
/**
17+
* The main paths of your project handle these with care
18+
*/
19+
exports.paths = {
20+
src: 'src',
21+
dist: 'dist',
22+
tmp: '.tmp',
23+
e2e: 'e2e',
24+
tasks: 'gulp_tasks'
25+
};
26+
27+
/**
28+
* used on gulp dist
29+
*/
30+
exports.htmlmin = {
31+
ignoreCustomFragments: [/{{.*?}}/]
32+
};
33+
34+
exports.path = {};
35+
for (const pathName in exports.paths) {
36+
if (Object.prototype.hasOwnProperty.call(exports.paths, pathName)) {
37+
exports.path[pathName] = function () {
38+
const pathValue = exports.paths[pathName];
39+
const funcArgs = Array.prototype.slice.call(arguments);
40+
const joinArgs = [pathValue].concat(funcArgs);
41+
return path.join.apply(this, joinArgs);
42+
};
43+
}
44+
}
45+
46+
/**
47+
* Common implementation for an error handler of a Gulp plugin
48+
*/
49+
exports.errorHandler = function (title) {
50+
return function (err) {
51+
gutil.log(gutil.colors.red(`[${title}]`), err.toString());
52+
this.emit('end');
53+
};
54+
};

conf/karma-auto.conf.js

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
const conf = require('./gulp.conf');
2+
3+
module.exports = function (config) {
4+
const configuration = {
5+
basePath: '../',
6+
singleRun: false,
7+
autoWatch: true,
8+
logLevel: 'INFO',
9+
junitReporter: {
10+
outputDir: 'test-reports'
11+
},
12+
browsers: [
13+
'PhantomJS'
14+
],
15+
frameworks: [
16+
'jasmine'
17+
],
18+
files: [
19+
'node_modules/es6-shim/es6-shim.js',
20+
conf.path.src('index.spec.js'),
21+
conf.path.src('**/*.html')
22+
],
23+
preprocessors: {
24+
[conf.path.src('index.spec.js')]: [
25+
'webpack'
26+
],
27+
[conf.path.src('**/*.html')]: [
28+
'ng-html2js'
29+
]
30+
},
31+
ngHtml2JsPreprocessor: {
32+
stripPrefix: `${conf.paths.src}/`
33+
},
34+
reporters: ['progress', 'coverage'],
35+
coverageReporter: {
36+
type: 'html',
37+
dir: 'coverage/'
38+
},
39+
webpack: require('./webpack-test.conf'),
40+
webpackMiddleware: {
41+
noInfo: true
42+
},
43+
plugins: [
44+
require('karma-jasmine'),
45+
require('karma-junit-reporter'),
46+
require('karma-coverage'),
47+
require('karma-phantomjs-launcher'),
48+
require('karma-phantomjs-shim'),
49+
require('karma-ng-html2js-preprocessor'),
50+
require('karma-webpack')
51+
]
52+
};
53+
54+
config.set(configuration);
55+
};

conf/karma.conf.js

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
const conf = require('./gulp.conf');
2+
3+
module.exports = function (config) {
4+
const configuration = {
5+
basePath: '../',
6+
singleRun: true,
7+
autoWatch: false,
8+
logLevel: 'INFO',
9+
junitReporter: {
10+
outputDir: 'test-reports'
11+
},
12+
browsers: [
13+
'PhantomJS'
14+
],
15+
frameworks: [
16+
'jasmine'
17+
],
18+
files: [
19+
'node_modules/es6-shim/es6-shim.js',
20+
conf.path.src('index.spec.js'),
21+
conf.path.src('**/*.html')
22+
],
23+
preprocessors: {
24+
[conf.path.src('index.spec.js')]: [
25+
'webpack'
26+
],
27+
[conf.path.src('**/*.html')]: [
28+
'ng-html2js'
29+
]
30+
},
31+
ngHtml2JsPreprocessor: {
32+
stripPrefix: `${conf.paths.src}/`
33+
},
34+
reporters: ['progress', 'coverage'],
35+
coverageReporter: {
36+
type: 'html',
37+
dir: 'coverage/'
38+
},
39+
webpack: require('./webpack-test.conf'),
40+
webpackMiddleware: {
41+
noInfo: true
42+
},
43+
plugins: [
44+
require('karma-jasmine'),
45+
require('karma-junit-reporter'),
46+
require('karma-coverage'),
47+
require('karma-phantomjs-launcher'),
48+
require('karma-phantomjs-shim'),
49+
require('karma-ng-html2js-preprocessor'),
50+
require('karma-webpack')
51+
]
52+
};
53+
54+
config.set(configuration);
55+
};

conf/webpack-dist.conf.js

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
const webpack = require('webpack');
2+
const conf = require('./gulp.conf');
3+
const path = require('path');
4+
5+
const HtmlWebpackPlugin = require('html-webpack-plugin');
6+
const FailPlugin = require('webpack-fail-plugin');
7+
const ExtractTextPlugin = require('extract-text-webpack-plugin');
8+
const pkg = require('../package.json');
9+
const autoprefixer = require('autoprefixer');
10+
11+
module.exports = {
12+
module: {
13+
loaders: [
14+
{
15+
test: /\.json$/,
16+
loaders: [
17+
'json-loader'
18+
]
19+
},
20+
{
21+
test: /\.js$/,
22+
exclude: /node_modules/,
23+
loader: 'eslint-loader',
24+
enforce: 'pre'
25+
},
26+
{
27+
test: /\.(css|scss)$/,
28+
loaders: ExtractTextPlugin.extract({
29+
fallback: 'style-loader',
30+
use: 'css-loader?minimize!sass-loader!postcss-loader'
31+
})
32+
},
33+
{
34+
test: /\.(png|jpg|svg)$/,
35+
exclude: /node_modules/,
36+
loader: 'url-loader?limit=8192'
37+
},
38+
{
39+
test: /\.js$/,
40+
exclude: /node_modules/,
41+
loaders: [
42+
'ng-annotate-loader',
43+
'babel-loader'
44+
]
45+
},
46+
{
47+
test: /\.html$/,
48+
loaders: [
49+
'html-loader?' + JSON.stringify({
50+
attrs: ['img:src', 'img:ng-src']
51+
})
52+
]
53+
}
54+
]
55+
},
56+
plugins: [
57+
new webpack.optimize.OccurrenceOrderPlugin(),
58+
new webpack.NoEmitOnErrorsPlugin(),
59+
FailPlugin,
60+
new webpack.DefinePlugin({
61+
PRODUCTION: JSON.stringify(true),
62+
API_URL: JSON.stringify('')
63+
}),
64+
new HtmlWebpackPlugin({
65+
template: conf.path.src('index.html')
66+
}),
67+
new webpack.optimize.UglifyJsPlugin({
68+
mangle: false,
69+
output: {comments: false},
70+
compress: {unused: false, dead_code: false, warnings: false} // eslint-disable-line camelcase
71+
}),
72+
new ExtractTextPlugin('index-[contenthash].css'),
73+
new webpack.optimize.CommonsChunkPlugin({name: 'vendor'}),
74+
new webpack.LoaderOptionsPlugin({
75+
options: {
76+
postcss: () => [autoprefixer]
77+
}
78+
})
79+
],
80+
output: {
81+
path: path.join(process.cwd(), conf.paths.dist),
82+
filename: '[name]-[hash].js'
83+
},
84+
entry: {
85+
app: `./${conf.path.src('index')}`,
86+
vendor: Object.keys(pkg.dependencies)
87+
}
88+
};

conf/webpack-test.conf.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
const webpack = require('webpack');
2+
3+
module.exports = {
4+
module: {
5+
loaders: [
6+
{
7+
test: /\.json$/,
8+
loaders: [
9+
'json-loader'
10+
]
11+
},
12+
{
13+
test: /\.js$/,
14+
exclude: /node_modules/,
15+
loader: 'eslint-loader',
16+
enforce: 'pre'
17+
},
18+
{
19+
test: /\.js$/,
20+
exclude: /node_modules/,
21+
loaders: [
22+
'ng-annotate-loader',
23+
'babel-loader'
24+
]
25+
},
26+
{
27+
test: /\.(png|jpg|svg)$/,
28+
exclude: /node_modules/,
29+
loader: 'url-loader?limit=8192'
30+
},
31+
{
32+
test: /\.html$/,
33+
loaders: [
34+
'html-loader'
35+
]
36+
}
37+
]
38+
},
39+
plugins: [
40+
new webpack.LoaderOptionsPlugin({
41+
options: {},
42+
debug: true
43+
})
44+
],
45+
devtool: 'source-map'
46+
};

0 commit comments

Comments
 (0)