https://github.com/jasonshin/reason-vue
ReasonML and Vue
https://github.com/jasonshin/reason-vue
reasonml vue webpack
Last synced: about 1 year ago
JSON representation
ReasonML and Vue
- Host: GitHub
- URL: https://github.com/jasonshin/reason-vue
- Owner: JasonShin
- License: mit
- Created: 2017-12-24T11:17:02.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-03T00:23:55.000Z (almost 8 years ago)
- Last Synced: 2025-04-25T15:39:58.777Z (about 1 year ago)
- Topics: reasonml, vue, webpack
- Language: JavaScript
- Size: 1.31 MB
- Stars: 53
- Watchers: 9
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# reason-vue
> Vue.js fueled by the power of reasonml
## Current stage of development
### Immediate goal: MVP version
1. ~~vue-loader under build/loaders/re-loader.js must be registered as a custom loader via webpack using "resolveLoaders"~~
2. A simple Webpack build test that runs build and make sure it does not
fail while compiling
3. ~~vue-loader should read source passed in by vue-loader and parse it as raw JS using bsb-platform (bsb cli)~~
4. Once above requirements are done, the loader should work with
webpack-dev-server and standard webpack build task
5. Merge https://github.com/aweary/reason-vue/blob/master/src/vue.re into this project and use Vue binding inside main.re to initialise Vue instance
### How does re-loader works right now and what is the plan?
#### build
a) Clone project_root/src into __dirname/src-cloned
Why do we need this? By doing this, we do not clutter original src folder with .re and .bs.js mess
b) Extract sections from each vue file and write them into corresponding .bs.js files
c) Write arbitary bsconfig.json file into __dirname/bsconfig.json
d) Run `bsb -make-world` against __dirname/src-cloned
e) todo: what do you do now with generated .bs.js files?
## How to test manually
### 1. install dependencies
`npm install` or `yarn`
### 2. Trigger webpack build and test re-loader
`npm run build` or `yarn build`
It will trigger `sync-files`, `bsb -make-world` internally
## Decisions
### 25 / 12 / 2017
- We are going to rely on bsb-cli as strictly as possible
- To allow bsb-cli to compile <script>s inside .vue files, we will
extract all scripts into .vue.re files
- Then bsb-cli will be able to compile .vue.re files located under
`build/loaders/compiled` into js files
- Once bsb compilation is complete without any errors, it will pipe the resulted files down to vue-loader for final bundling
### 26 / 12 / 2017
- Experiment what happens when you run bsb -make-world against raw .re files
- Find out how and when to sync files in Webpack
- Run BSB on synced folder
- Iteratively resolve any dependencies and use addDependency
