- Fast, zero-config by default.
- The entrance is an html
- Built-in support for CSS Sass Stylus Less
- .ts .vue support
- Multiple js multiple stylesheets
yarn
yarn global add node-wakeup
npm
npm i -g node-wakeup
Write a html name
index.html
like this
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script src="index.js"></script>
</body>
</html>
Next you can write es6, or commonjs in index.js
end
wakeup watch
wakeup'll help you parse everything inside HTML, including js, CSS, and package it for you.
You just need to write html according to your habits.
stylesheet
write .less
.styl
.sass
in html
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="wake.css">
<link rel="stylesheet" href="wake1.less">
<link rel="stylesheet" href="wake2.styl">
<link rel="stylesheet" href="wake3.sass">
</head>
script
writ .vue
.ts
in html
<script src="index.ts"></script>
<script src="index2.vue"></script>
<script src="index3.js"></script>
Script has two more options, wu-name and wu-format wu-name is the name exposed to the global, the default is **the part before the point ** wu-format is the package mode, the default umd
<script src="index.js" wu-name="kaak" wu-format="iife"></script>
Detect file changes and package them into the .wekeup directory
wakeup watch // wu w
and Bundles to dist directory
wakeup build //wu b
a options is --index To change the name of the entry html
wakeup build --index test.html // or wu b -i test
Ok,we can work happily.
Wakeup has no configuration file, but you can insert on HTML
<body>
<wu-opt port="9999" open-browser="true"></wu-opt>
</body>
port
default 10001host
default localhostres-path
Image packaging prefix default imgopen-browser
default falselive-reload
default truelive-reload-port
default 35729live-reload-port
default 35729ts
use typescript default falsets-config
If this file exists , use typescript config default ./tsconfig.json