https://github.com/ftbjs/ftb-service
零配置开发开发基于Javascript的库和应用的脚手架
https://github.com/ftbjs/ftb-service
babel7 cli javascript release-package scss single-page-applications typescript webpack-server webpack4 zero-configuration
Last synced: 2 months ago
JSON representation
零配置开发开发基于Javascript的库和应用的脚手架
- Host: GitHub
- URL: https://github.com/ftbjs/ftb-service
- Owner: ftbjs
- License: mit
- Created: 2020-04-01T14:10:09.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-15T15:31:43.000Z (almost 5 years ago)
- Last Synced: 2025-02-24T19:39:59.644Z (3 months ago)
- Topics: babel7, cli, javascript, release-package, scss, single-page-applications, typescript, webpack-server, webpack4, zero-configuration
- Language: TypeScript
- Homepage:
- Size: 157 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Welcome to ftb-service 👋
> A tool to start a server with Webpack. support hot module replacement and build.
### 🏠 [Homepage](https://github.com/ftbjs/ftb-service#readme)
### ✨ [Example](https://github.com/ftbjs/ftb-service/tree/master/example)
## Install
**Global**
```sh
npm i @ftbjs/service -g
```**Local**
```sh
npm i @ftbjs/service -D
```## Create Template Quickly
```js
ftbjs create
```## Usage
**Global**
```js
// start a local serve
ftbjs serve// build project
ftbjs build// visualize size of webpack output files
ftbjs build --analyzer
```**Local**
Add below code in your project's package.json
```js
...
"scripts": {
"dev": "ftbjs serve",
"build": "ftbjs build",
"analyzer": "ftbjs build --analyzer"
},
...
```## ftb.config.js
```js
module.exports = {
devServer: {
port: 2021,
open: true
},
packages: true, // for build library need to set it as true
chainWebpack: config => {
if (process.env.NODE_ENV === 'production') {
config.output.filename('my-test.min.js').library('MyTest').libraryTarget('umd')
}
}
}
```## Required
You need to have a src folder. and its has a index.js file. then run the `ftbjs serve` or `ftbjs build`. For more information please see [Example](https://github.com/ftbjs/ftb-service/tree/master/example)
## 🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/ftbjs/ftb-service/issues). You can also take a look at the [contributing guide](https://github.com/ftbjs/ftb-service/tree/master/Contribution.md).## Show your support
Give a ⭐️ if this project helped you!
## 📝 License
Copyright © 2020 [[email protected]](https://github.com/BiYuqi).
This project is [MIT](https://github.com/ftbjs/ftb-service/blob/master/LICENSE) licensed.---
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_