An open API service indexing awesome lists of open source software.

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的库和应用的脚手架

Awesome Lists containing this project

README

        

Welcome to ftb-service 👋



Version

Documentation


Maintenance


License: MIT

Last Commit

> 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)_