Microbot first commit
This commit is contained in:
10
bower.json
Normal file
10
bower.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "stack_route_prj7",
|
||||
"description": "A starter project for Bootstrap",
|
||||
"version": "0.0.0",
|
||||
"homepage": "https://github.com/mohiit1502/stack_route_prj7",
|
||||
"license": "The Unlicense",
|
||||
"private": true,
|
||||
"dependencies": {}
|
||||
}
|
||||
|
||||
1
bundle.js
Normal file
1
bundle.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t){},function(e,t,n){new(n(0))("Sapient");document.write("<h1>${g.greet()} </h1>")},function(e,t,n){e.exports=n(1)}]);
|
||||
32
gulpfile.js
Normal file
32
gulpfile.js
Normal file
@@ -0,0 +1,32 @@
|
||||
const gulp = require('gulp');
|
||||
const sass = require('gulp-sass');
|
||||
const browserSync = require('browser-sync').create();
|
||||
|
||||
//compile by scss to css and place in my src folder
|
||||
gulp.task('sass',() =>{
|
||||
return gulp
|
||||
.src(['styles/scss/*.scss'])
|
||||
.pipe(sass())
|
||||
.pipe(gulp.dest('styles/css'))
|
||||
.pipe(browserSync.stream());
|
||||
}
|
||||
)
|
||||
|
||||
gulp.task('js',() =>{
|
||||
return gulp
|
||||
.src(['node_modules/bootstrap/dist/js/bootstrap.min.js','node_modules/jquery/jquery.min.js','node_modules/popper.js'])
|
||||
.pipe(gulp.dest('js'))
|
||||
.pipe(browserSync.stream());
|
||||
}
|
||||
)
|
||||
|
||||
// Static Server + watching scss/html files
|
||||
gulp.task('serve', ['sass'], function() {
|
||||
browserSync.init({
|
||||
server: '.'
|
||||
});
|
||||
gulp.watch("styles/scss/*.scss", ['sass']);
|
||||
gulp.watch("*.html").on('change', browserSync.reload);
|
||||
});
|
||||
|
||||
gulp.task('default', ['serve','js']);
|
||||
43
package.json
Normal file
43
package.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "stack_route_prj8",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"description": "A starter project for JavaScript - Webpack",
|
||||
"repository": "https://github.com/mohiit1502/stack_route_prj8",
|
||||
"license": "The Unlicense",
|
||||
"devDependencies": {
|
||||
"bower": "^1.3.1",
|
||||
"http-server": "^0.11.1",
|
||||
"karma": "^2.0.4",
|
||||
"karma-junit-reporter": "^0.2.2",
|
||||
"protractor": "^5.3.2",
|
||||
"shelljs": "^0.2.6",
|
||||
"webpack-cli": "^3.0.8"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "bower install",
|
||||
"prestart": "npm install",
|
||||
"start": "http-server -a localhost -p 8080 -c-1",
|
||||
"pretest": "npm install",
|
||||
"test": "karma start karma.conf.js",
|
||||
"test-single-run": "karma start karma.conf.js --single-run",
|
||||
"preupdate-webdriver": "npm install",
|
||||
"update-webdriver": "webdriver-manager update"
|
||||
},
|
||||
"dependencies": {
|
||||
"bootstrap": "4.1.1",
|
||||
"bootswatch": "^4.1.1",
|
||||
"browser-sync": "^2.24.5",
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-sass": "^4.0.1",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"json-server": "^0.14.0",
|
||||
"raw-loader": "^0.5.1",
|
||||
"popper": "1.0.1",
|
||||
"sass": "1.9.0",
|
||||
"webpack": "^4.16.0",
|
||||
"webpack-dev-server": "^3.1.4",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-loader": "^7.1.5"
|
||||
}
|
||||
}
|
||||
12
public/index.html
Normal file
12
public/index.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Webpack</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello, Spaient Immersive!</h1>
|
||||
<script type="text/javascript" src="./bundle.js"></script></body>
|
||||
</html>
|
||||
9
src/js/greeter.js
Normal file
9
src/js/greeter.js
Normal file
@@ -0,0 +1,9 @@
|
||||
class Greeter {
|
||||
constructor(name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
greet() {
|
||||
return 'Hello' + this.name;
|
||||
}
|
||||
}
|
||||
5
src/js/index.js
Normal file
5
src/js/index.js
Normal file
@@ -0,0 +1,5 @@
|
||||
const Greeter = require("./Greeter");
|
||||
|
||||
const g = new Greeter('Sapient');
|
||||
|
||||
document.write('<h1>${g.greet()} </h1>')
|
||||
21
webpack.config.js
Normal file
21
webpack.config.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: ['./src/js/index.js'],
|
||||
output: {
|
||||
path: __dirname + '/dist',
|
||||
filename: './bundle.js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{ test: /.js/, loader: 'babel-loader', exclude: /node_modules/ },
|
||||
{ test: /.html/, loader: 'raw-loader', exclude: /node_modules/ }
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: './public/index.html'
|
||||
})
|
||||
],
|
||||
mode: 'development'
|
||||
};
|
||||
Reference in New Issue
Block a user