mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-20 21:35:42 +02:00
Added vitejs as a launcher for index.html. package.json 'prepare' command is used to create the index.html file to be used with vite
This commit is contained in:
parent
40ddfcab77
commit
acc6555ded
11 changed files with 5007 additions and 4 deletions
|
@ -112,7 +112,7 @@ var buildIndex = function(done) {
|
||||||
|
|
||||||
if (process.env.CI) {
|
if (process.env.CI) {
|
||||||
writeFileSync('build/index.html', outputIndex);
|
writeFileSync('build/index.html', outputIndex);
|
||||||
copyRecursiveSync('assets', 'build/assets');
|
copyRecursiveSync('public/assets', 'build/assets');
|
||||||
} else {
|
} else {
|
||||||
writeFileSync('index.html', outputIndex);
|
writeFileSync('index.html', outputIndex);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
"author": "Peter Cottle <petermcottle@gmail.com>",
|
"author": "Peter Cottle <petermcottle@gmail.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "vite build",
|
||||||
|
"prepare": "gulp fastBuild",
|
||||||
"test": "gulp test"
|
"test": "gulp test"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -33,7 +36,8 @@
|
||||||
"jshint": "^2.13.4",
|
"jshint": "^2.13.4",
|
||||||
"prompt": "^1.2.2",
|
"prompt": "^1.2.2",
|
||||||
"vinyl-buffer": "^1.0.1",
|
"vinyl-buffer": "^1.0.1",
|
||||||
"vinyl-source-stream": "^2.0.0"
|
"vinyl-source-stream": "^2.0.0",
|
||||||
|
"vite": "^5.0.12"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"backbone": "^1.4.0",
|
"backbone": "^1.4.0",
|
||||||
|
|
4984
pnpm-lock.yaml
generated
Normal file
4984
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load diff
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
|
@ -1,5 +1,4 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/html4/strict.dtd">
|
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|
16
vite.config.js
Normal file
16
vite.config.js
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig(({ command, mode, isSsrBuild, isPreview }) => {
|
||||||
|
if (command === 'serve') {
|
||||||
|
return {
|
||||||
|
// dev specific config
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// command === 'build'
|
||||||
|
return {
|
||||||
|
// build specific config
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue