feat(build): parcel (#2227) (#2229)

* feat(build): parcel

* feat(parcel): gulp & tests

* build(parcel): exclude package-lock

* build(parcel): add private field to prevent accident npm publish
This commit is contained in:
Vlad Tansky
2020-05-08 16:40:28 +03:00
committed by GitHub
parent 87acc19836
commit 6862fd310d
8 changed files with 14961 additions and 0 deletions

3
dist/.gitignore vendored
View File

@@ -1,3 +1,6 @@
# Include your project-specific ignores in this file
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files
# Useful .gitignore templates: https://github.com/github/gitignore
node_modules
dist
.cache

7450
dist/package-lock.json generated vendored Normal file

File diff suppressed because it is too large Load Diff

21
dist/package.json vendored Normal file
View File

@@ -0,0 +1,21 @@
{
"name": "html5-boilerplate",
"version": "1.0.0",
"description": "",
"main": "index.js",
"private": true,
"directories": {
"doc": "doc"
},
"scripts": {
"start": "npm run build",
"build": "parcel build index.html",
"dev": "parcel index.html",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"parcel-bundler": "^1.12.4"
}
}

View File

@@ -31,6 +31,12 @@ gulp.task('archive:zip', (done) => {
const zip = archiver('zip');
const files = glob.sync('**/*.*', {
'cwd': dirs.dist,
'ignore': [
'**/node_modules/**',
'package-lock.json',
'**/dist/**',
'**/.cache/**',
],
'dot': true // include hidden files
});
const output = fs.createWriteStream(archiveName);

3
src/.gitignore vendored
View File

@@ -1,3 +1,6 @@
# Include your project-specific ignores in this file
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files
# Useful .gitignore templates: https://github.com/github/gitignore
node_modules
dist
.cache

7450
src/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

21
src/package.json Normal file
View File

@@ -0,0 +1,21 @@
{
"name": "html5-boilerplate",
"version": "1.0.0",
"description": "",
"main": "index.js",
"private": true,
"directories": {
"doc": "doc"
},
"scripts": {
"start": "npm run build",
"build": "parcel build index.html",
"dev": "parcel index.html",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"parcel-bundler": "^1.12.4"
}
}

View File

@@ -18,6 +18,7 @@ const expectedFilesInDistDir = [
'.gitignore',
'.htaccess',
'404.html',
'package.json',
'browserconfig.xml',
'css/', // for directories, a `/` character
@@ -66,6 +67,12 @@ function checkFiles(directory, expectedFiles) {
// Get the list of files from the specified directory
const files = glob.sync('**/*', {
'cwd': directory,
'ignore': [
'**/node_modules/**',
'package-lock.json',
'**/dist/**',
'**/.cache/**',
],
'dot': true, // include hidden files
'mark': true // add a `/` character to directory matches
});