Skip to content

Commit a500677

Browse files
committed
first-commit
0 parents  commit a500677

16 files changed

+16271
-0
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 4
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
/node_modules
3+
dist

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# My Simple Webpack starter
2+
Simple webpack starter with Javascript es6 and SCSS, Without any frameworks.

docker-compose.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: "2"
2+
3+
services:
4+
node:
5+
image: dlohani/node:react-native
6+
volumes:
7+
- ./:/web-project
8+
- /sys/fs/cgroup:/sys/fs/cgroup:ro
9+
entrypoint: /bin/sh
10+
working_dir: /web-project
11+
ports:
12+
- "8080:8080"
13+
container_name: simple-web-starter
14+
restart: restart

index.html

+124
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>Webpack starter basic</title>
7+
<!-- Twitter Card data -->
8+
<meta name="twitter:card" value="Webpack basic starter project">
9+
<meta name="Description" content="A simple webpack starter project for your basic web development needs."/>
10+
<!-- Open Graph data -->
11+
<meta property="og:title" content="Webpack basic starter project" />
12+
<meta property="og:type" content="article" />
13+
<meta property="og:url" content="https://lifenautjoe.github.io/webpack-starter-basic/" />
14+
<meta property="og:image" content="https://i.snag.gy/i3eMBc.jpg" />
15+
<meta property="og:description" content="A simple webpack starter project for your basic web development needs." />
16+
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700" rel="stylesheet">
17+
</head>
18+
<body>
19+
<!-- DEMO Project page content STARTS -->
20+
<div class="video-background">
21+
<div class="video-foreground">
22+
<iframe
23+
src="https://www.youtube.com/embed/iIEIjo4dvSs?controls=0&showinfo=0&rel=0&autoplay=1&loop=1&playlist=iIEIjo4dvSs"
24+
frameborder="0" allowfullscreen></iframe>
25+
</div>
26+
</div>
27+
<div class="splash">
28+
<div class="splash__content">
29+
<div class="splash-title">
30+
<a href="https://github.com/lifenautjoe/webpack-starter-basic" target="_blank"><img class="splash-title__img"
31+
src="<%= require('./src/assets/logo-on-dark-bg.png') %>"
32+
alt="webpack logo"></a>
33+
</div>
34+
<div class="splash-overview">
35+
<h1 class="splash-overview__heading">I'm a a simple webpack starter project for your basic web development needs.
36+
</h1>
37+
<div class="splash-overview__star">
38+
<!-- Place this tag where you want the button to render. -->
39+
<a class="github-button" href="https://github.com/lifenautjoe/webpack-starter-basic" data-show-count="true"
40+
aria-label="Star lifenautjoe/webpack3-starter on GitHub">Star</a>
41+
</div>
42+
<div class="splash-overview__conclusion">
43+
<strong> No <a href="https://pragprog.com/the-pragmatic-programmer/extracts/wizards">wizard code</a>,
44+
understandable, scalable.</strong>
45+
</div>
46+
<div class="splash-overview__details">
47+
A <strong>minimal</strong> yet <strong>rich</strong> set of features to get you going.
48+
<div class="splash-overview-plugins">
49+
<button id="plugins-trigger" class="splash-overview-plugins__trigger">
50+
Show features
51+
</button>
52+
<ul id="plugins" class="splash-overview-plugins__list">
53+
<li class="splash-overview-plugins__item">
54+
<a target="_blank" href="https://github.com/babel/babel-loader">Use the latest JavaScript</a>
55+
</li>
56+
<li class="splash-overview-plugins__item">
57+
<a target="_blank" href="https://github.com/webpack-contrib/sass-loader">Write styles in Sass</a>
58+
</li>
59+
<li class="splash-overview-plugins__item">
60+
<a target="_blank" href="https://github.com/webpack-contrib/url-loader">Load and bundle your assets</a>
61+
</li>
62+
<li class="splash-overview-plugins__item">
63+
<a target="_blank"
64+
href="https://github.com/webpack/webpack-dev-server">Start a development server and preview your work</a>
65+
</li>
66+
<li class="splash-overview-plugins__item">
67+
<a target="_blank" href="https://github.com/postcss/autoprefixer">Automatic css vendor prefixes</a>
68+
</li>
69+
<li class="splash-overview-plugins__item">
70+
<a target="_blank" href="https://github.com/webpack-contrib/uglifyjs-webpack-plugin">Optimizes scripts for production</a>
71+
</li>
72+
<li class="splash-overview-plugins__item">
73+
<a target="_blank" href="https://github.com/NMFR/optimize-css-assets-webpack-plugin">Optimizes styles for production</a>
74+
</li>
75+
<li class="splash-overview-plugins__item">
76+
<a target="_blank" href="https://github.com/jantimon/favicons-webpack-plugin">Generates favicons</a>
77+
</li>
78+
</ul>
79+
</div>
80+
</div>
81+
<div class="splash-overview-start">
82+
<div class="splash-overview-start__command">
83+
git clone https://github.com/lifenautjoe/webpack-starter-basic PROJECT-NAME
84+
</div>
85+
<div class="splash-overview-start__command">
86+
cd PROJECT-NAME
87+
</div>
88+
<div class="splash-overview-start__command">
89+
npm install <span class="splash-overview-start__comment"># Install dependencies </span>
90+
</div>
91+
<div class="splash-overview-start__command">
92+
npm run kickstart <span class="splash-overview-start__comment"># Configure your project</span>
93+
</div>
94+
<div class="splash-overview-start__command">
95+
npm run start <span class="splash-overview-start__comment"># Start the development server</span>
96+
</div>
97+
<div class="splash-overview-start__command">
98+
npm run build <span class="splash-overview-start__comment"># Build for production</span>
99+
</div>
100+
</div>
101+
<div class="splash-overview-issues">
102+
<div>Have an issue or are in need of guidance?</div>
103+
<strong>Open an issue <a
104+
href="https://github.com/lifenautjoe/webpack3-starter/issues">here</a>. </strong>
105+
</div>
106+
<div class="splash-overview-footer">
107+
A project by <strong><a target="_blank" href="https://www.lifenautjoe.com">@lifenautjoe</a></strong>.
108+
</div>
109+
</div>
110+
</div>
111+
</div>
112+
<script async defer src="https://buttons.github.io/buttons.js"></script>
113+
<!-- Global Site Tag (gtag.js) - Google Analytics -->
114+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-101423651-2"></script>
115+
<script>
116+
window.dataLayer = window.dataLayer || [];
117+
function gtag(){dataLayer.push(arguments);}
118+
gtag('js', new Date());
119+
120+
gtag('config', 'UA-101423651-2');
121+
</script>
122+
<!-- DEMO Project page content ENDS -->
123+
</body>
124+
</html>

kickstarter.js

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
const inquirer = require('inquirer');
2+
const ui = new inquirer.ui.BottomBar();
3+
const fs = require('fs');
4+
const rimraf = require('rimraf');
5+
6+
const packageJson = require('./package.json');
7+
8+
async function kickstart() {
9+
10+
const questions = await inquirer.prompt([
11+
{
12+
type: 'input',
13+
name: 'projectName',
14+
message: `What's the name of your project? (kebab-cased)`,
15+
default: 'awesome-project'
16+
},
17+
{
18+
type: 'input',
19+
name: 'projectAuthor',
20+
message: `Who's the author?`,
21+
default: 'John Doe'
22+
}
23+
]);
24+
25+
const {projectName, projectAuthor} = questions;
26+
27+
ui.log.write('Removing /docs directory');
28+
rimraf.sync('./docs');
29+
30+
ui.log.write('Updating package.json name');
31+
packageJson.name = projectName;
32+
ui.log.write('Updating package.json author');
33+
packageJson.author = projectAuthor;
34+
35+
packageJson.description = '';
36+
37+
ui.log.write('Removing package.json git repository');
38+
packageJson.keywords = [];
39+
packageJson.repository.url = '';
40+
41+
ui.log.write('Removing .git directory');
42+
rimraf.sync('.git');
43+
44+
ui.log.write('Removing package.json kickstart dependencies');
45+
packageJson.kickstartDependencies.forEach((kickstartDependency) => {
46+
delete packageJson.devDependencies[kickstartDependency];
47+
rimraf.sync(`./node-modules/${kickstartDependency}`);
48+
});
49+
50+
delete packageJson.kickstartDependencies;
51+
52+
packageJson.homepage = '';
53+
packageJson.bugs.url = '';
54+
55+
ui.log.write('Removing package.json kickstart script');
56+
delete packageJson.scripts.kickstart;
57+
58+
ui.log.write('Writing new package.json');
59+
fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, 4));
60+
61+
ui.log.write('Removing package-lock.json');
62+
fs.unlinkSync('./package-lock.json');
63+
64+
ui.log.write('Removing kickstarter script');
65+
fs.unlinkSync('./kickstarter.js');
66+
67+
ui.log.write('All done!');
68+
}
69+
70+
kickstart();
71+
72+

0 commit comments

Comments
 (0)