Commit fb960ea4 authored by Venkata Raguru's avatar Venkata Raguru

Created Build structure

parent f136ebea
{
"presets": [
"@babel/preset-env"
]
}
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
# change these settings to your own preference
indent_style = space
indent_size = 2
# we recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[package.json]
indent_style = space
indent_size = 2
* text=auto
\ No newline at end of file
# dependencies
node_modules
bower_components
# compiled output
/dist
/.tmp
# System Files
.DS_Store
Thumbs.db
{
"generator-mocha": {
"ui": "bdd",
"rjs": false
}
}
\ No newline at end of file
src/Projects/HGM/app/apple-touch-icon.png

6.54 KB

src/Projects/HGM/app/favicon.ico

4.19 KB

<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>HGM</title>
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
<!-- build:css styles/vendor.css -->
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.min.css" type="text/css" />
<!-- endbuild -->
<!-- build:css styles/main.css -->
<link rel="stylesheet" href="styles/main.css">
<!-- endbuild -->
<!-- build:js scripts/modernizr.js -->
<script src="scripts/modernizr.js"></script>
<!-- endbuild -->
</head>
<body>
<!--[if IE]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="container">
<div class="header">
<ul class="nav nav-pills float-right">
<li class="nav-item">
<a href="#" class="nav-link active">Home</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">About</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Contact</a>
</li>
</ul>
<h3 class="text-muted">HGM</h3>
</div>
<div class="jumbotron">
<h1 class="display-3">'Allo, 'Allo!</h1>
<p class="lead">Always a pleasure scaffolding your apps.</p>
<p><a class="btn btn-lg btn-success" href="#">Splendid!</a></p>
</div>
<div class="row marketing">
<div class="col-lg-6">
<h4>HTML5 Boilerplate</h4>
<p>HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.</p>
<h4>Sass</h4>
<p>Sass is the most mature, stable, and powerful professional grade CSS extension language in the world.</p>
<h4>Bootstrap</h4>
<p>Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.</p>
<h4>Modernizr</h4>
<p>Modernizr is an open-source JavaScript library that helps you build the next generation of HTML5 and CSS3-powered websites.</p>
</div>
</div>
<div class="footer">
<p>♥ from the Yeoman team</p>
</div>
</div>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='https://www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-XXXXX-X');ga('send','pageview');
</script>
<!-- build:js scripts/vendor.js -->
<script type="text/javascript" src="/node_modules/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="/node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- endbuild -->
<!-- build:js scripts/main.js -->
<script src="scripts/main.js"></script>
<!-- endbuild -->
</body>
</html>
# robotstxt.org/
User-agent: *
Disallow:
console.log('\'Allo \'Allo!');
// Uncomment to enable Bootstrap tooltips
// https://getbootstrap.com/docs/4.0/components/tooltips/#example-enable-tooltips-everywhere
// $(function () { $('[data-toggle="tooltip"]').tooltip(); });
// Uncomment to enable Bootstrap popovers
// https://getbootstrap.com/docs/4.0/components/popovers/#example-enable-popovers-everywhere
// $(function () { $('[data-toggle="popover"]').popover(); });
.browserupgrade {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
/* Space out content a bit */
body {
padding-top: 1.5rem;
padding-bottom: 1.5rem;
}
/* Everything but the jumbotron gets side spacing for mobile first views */
.header,
.marketing,
.footer {
padding-right: 1rem;
padding-left: 1rem;
}
/* Custom page header */
.header {
padding-bottom: 1rem;
border-bottom: .05rem solid #e5e5e5;
background-color: #e6fe54;
ul{
list-style: none;
display: flex;
}
}
/* Make the masthead heading the same height as the navigation */
.header h3 {
margin-top: 0;
margin-bottom: 0;
line-height: 3rem;
}
/* Custom page footer */
.footer {
padding-top: 1.5rem;
color: #777;
border-top: .05rem solid #e5e5e5;
}
/* Customize container */
@media (min-width: 48em) {
.container {
max-width: 46rem;
}
}
.container-narrow > hr {
margin: 2rem 0;
}
/* Main marketing message and sign up button */
.jumbotron {
text-align: center;
border-bottom: .05rem solid #e5e5e5;
}
.jumbotron .btn {
padding: .75rem 1.5rem;
font-size: 1.5rem;
}
/* Supporting marketing content */
.marketing {
margin: 3rem 0;
}
.marketing p + h4 {
margin-top: 1.5rem;
}
/* Responsive: Portrait tablets and up */
@media screen and (min-width: 48em) {
/* Remove the padding we set earlier */
.header,
.marketing,
.footer {
padding-right: 0;
padding-left: 0;
}
/* Space out the masthead */
.header {
margin-bottom: 2rem;
}
/* Remove the bottom border on the jumbotron for visual effect */
.jumbotron {
border-bottom: 0;
}
}
// generated on 2021-04-01 using generator-webapp 4.0.0-8
const { src, dest, watch, series, parallel, lastRun } = require('gulp');
const gulpLoadPlugins = require('gulp-load-plugins');
const fs = require('fs');
const mkdirp = require('mkdirp');
const Modernizr = require('modernizr');
const browserSync = require('browser-sync');
const del = require('del');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
const { argv } = require('yargs');
const $ = gulpLoadPlugins();
const server = browserSync.create();
const port = argv.port || 9000;
const isProd = process.env.NODE_ENV === 'production';
const isTest = process.env.NODE_ENV === 'test';
const isDev = !isProd && !isTest;
function styles() {
return src('app/styles/*.scss', {
sourcemaps: !isProd,
})
.pipe($.plumber())
.pipe($.sass.sync({
outputStyle: 'expanded',
precision: 10,
includePaths: ['.']
}).on('error', $.sass.logError))
.pipe($.postcss([
autoprefixer()
]))
.pipe(dest('.tmp/styles', {
sourcemaps: !isProd,
}))
.pipe(server.reload({stream: true}));
};
function scripts() {
return src('app/scripts/**/*.js', {
sourcemaps: !isProd,
})
.pipe($.plumber())
.pipe($.babel())
.pipe(dest('.tmp/scripts', {
sourcemaps: !isProd ? '.' : false,
}))
.pipe(server.reload({stream: true}));
};
async function modernizr() {
const readConfig = () => new Promise((resolve, reject) => {
fs.readFile(`${__dirname}/modernizr.json`, 'utf8', (err, data) => {
if (err) reject(err);
resolve(JSON.parse(data));
})
})
const createDir = () => new Promise((resolve, reject) => {
mkdirp(`${__dirname}/.tmp/scripts`, err => {
if (err) reject(err);
resolve();
})
});
const generateScript = config => new Promise((resolve, reject) => {
Modernizr.build(config, content => {
fs.writeFile(`${__dirname}/.tmp/scripts/modernizr.js`, content, err => {
if (err) reject(err);
resolve(content);
});
})
});
const [config] = await Promise.all([
readConfig(),
createDir()
]);
await generateScript(config);
}
const lintBase = (files, options) => {
return src(files)
.pipe($.eslint(options))
.pipe(server.reload({stream: true, once: true}))
.pipe($.eslint.format())
.pipe($.if(!server.active, $.eslint.failAfterError()));
}
function lint() {
return lintBase('app/scripts/**/*.js', { fix: true })
.pipe(dest('app/scripts'));
};
function lintTest() {
return lintBase('test/spec/**/*.js');
};
function html() {
return src('app/*.html')
.pipe($.useref({searchPath: ['.tmp', 'app', '.']}))
.pipe($.if(/\.js$/, $.uglify({compress: {drop_console: true}})))
.pipe($.if(/\.css$/, $.postcss([cssnano({safe: true, autoprefixer: false})])))
.pipe($.if(/\.html$/, $.htmlmin({
collapseWhitespace: true,
minifyCSS: true,
minifyJS: {compress: {drop_console: true}},
processConditionalComments: true,
removeComments: true,
removeEmptyAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
})))
.pipe(dest('dist'));
}
function images() {
return src('app/images/**/*', { since: lastRun(images) })
.pipe($.imagemin())
.pipe(dest('dist/images'));
};
function fonts() {
return src('app/fonts/**/*.{eot,svg,ttf,woff,woff2}')
.pipe($.if(!isProd, dest('.tmp/fonts'), dest('dist/fonts')));
};
function extras() {
return src([
'app/*',
'!app/*.html'
], {
dot: true
}).pipe(dest('dist'));
};
function clean() {
return del(['.tmp', 'dist'])
}
function measureSize() {
return src('dist/**/*')
.pipe($.size({title: 'build', gzip: true}));
}
const build = series(
clean,
parallel(
lint,
series(parallel(styles, scripts, modernizr), html),
images,
fonts,
extras
),
measureSize
);
function startAppServer() {
server.init({
notify: false,
port,
server: {
baseDir: ['.tmp', 'app'],
routes: {
'/node_modules': 'node_modules'
}
}
});
watch([
'app/*.html',
'app/images/**/*',
'.tmp/fonts/**/*'
]).on('change', server.reload);
watch('app/styles/**/*.scss', styles);
watch('app/scripts/**/*.js', scripts);
watch('modernizr.json', modernizr);
watch('app/fonts/**/*', fonts);
}
function startTestServer() {
server.init({
notify: false,
port,
ui: false,
server: {
baseDir: 'test',
routes: {
'/scripts': '.tmp/scripts',
'/node_modules': 'node_modules'
}
}
});
watch('test/index.html').on('change', server.reload);
watch('app/scripts/**/*.js', scripts);
watch('test/spec/**/*.js', lintTest);
}
function startDistServer() {
server.init({
notify: false,
port,
server: {
baseDir: 'dist',
routes: {
'/node_modules': 'node_modules'
}
}
});
}
let serve;
if (isDev) {
serve = series(clean, parallel(styles, scripts, modernizr, fonts), startAppServer);
} else if (isTest) {
serve = series(clean, scripts, startTestServer);
} else if (isProd) {
serve = series(build, startDistServer);
}
exports.serve = serve;
exports.build = build;
exports.default = build;
{
"classPrefix": "modernizr-",
"options": [
"addTest",
"atRule",
"domPrefixes",
"hasEvent",
"html5shiv",
"html5printshiv",
"load",
"mq",
"prefixed",
"prefixes",
"prefixedCSS",
"setClasses",
"testAllProps",
"testProp",
"testStyles"
],
"feature-detects": [
"css/supports",
"img/sizes",
"img/srcset",
"serviceworker",
"touchevents"
]
}
\ No newline at end of file
This diff is collapsed.
{
"private": true,
"engines": {
"node": ">=4"
},
"dependencies": {
"jquery": "^3.4.1",
"modernizr": "^3.7.1",
"popper.js": "^1.15.0"
},
"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"autoprefixer": "^9.5.1",
"browser-sync": "^2.26.5",
"cross-env": "^5.2.0",
"cssnano": "^4.1.10",
"del": "^4.1.1",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-cli": "^2.2.0",
"gulp-eslint": "^5.0.0",
"gulp-filter": "^6.0.0",
"gulp-htmlmin": "^5.0.1",
"gulp-if": "^2.0.2",
"gulp-imagemin": "^6.0.0",
"gulp-load-plugins": "^1.6.0",
"gulp-plumber": "^1.2.1",
"gulp-postcss": "^8.0.0",
"gulp-sass": "^4.0.2",
"gulp-size": "^3.0.0",
"gulp-uglify": "^3.0.2",
"gulp-useref": "^3.1.6",
"mkdirp": "^0.5.1",
"mocha": "^6.1.4",
"yargs": "13.2.4"
},
"scripts": {
"serve:test": "cross-env NODE_ENV=test gulp serve",
"serve:dist": "cross-env NODE_ENV=production gulp serve",
"start": "gulp serve",
"build": "cross-env NODE_ENV=production gulp",
"test": "npm run serve:test",
"tasks": "gulp --tasks"
},
"browserslist": [
"> 1%",
"last 2 versions",
"Firefox ESR"
],
"eslintConfig": {
"parserOptions": {
"sourceType": "module"
},
"env": {
"es6": true,
"node": true,
"browser": true,
"jquery": true
},
"rules": {
"quotes": [
2,
"single"
]
}
}
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Mocha Spec Runner</title>
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
</head>
<body>
<div id="mocha"></div>
<script src="../node_modules/mocha/mocha.js"></script>
<script>mocha.setup('bdd');</script>
<script src="../node_modules/chai/chai.js"></script>
<script>
var assert = chai.assert;
var expect = chai.expect;
var should = chai.should();
</script>
<!-- include source files here... -->
<!-- include spec files here... -->
<script src="spec/test.js"></script>
<script>
if (navigator.userAgent.indexOf('PhantomJS') === -1) {
mocha.run();
}
</script>
</body>
</html>
(function () {
'use strict';
describe('Give it some context', function () {
describe('maybe a bit more context here', function () {
it('should run here few assertions', function () {
});
});
});
})();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment