Skip to content

Quite different approach to provide transpiling Stylus and JSX

License

Notifications You must be signed in to change notification settings

mikejav/web-starter-sx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

web-starter-sx

web-starter-sx is example of different approach of provide transpiling Stylus and JSX using Gulp 4

Directory Layout

├── dist/                       # Folder for compiled output
├── src/                        # Application source code
│   ├── app/                    # JSX source code
│   │   └── concat.json         # *.jsx | *.js concatenate sequence
│   ├── style/                  # Stylus source code
│   │   └── main.styl           # Stylus entry point
│   └── index.html              # index.html include js, and css files
├── node_modules/               # 3rd-party libraries and utilities
├── gulpfile.js                 # Gulpfile
└── package.json                # The list of project dependencies and NPM scripts

How this exacly work?

  • When save the src/app/**/*.jsx file, gulp transpiling all .jsx files to .js and concatenate them together as specified in src/app/concat.json
  • When save the src/app/**/*.styl file, gulp transpiling .styl files whose was included in main.styl entry point file.

Usage

Install:

git clone https://github.com/mikejav/web-starter-sx
npm install

shell commands:

npm run dev             # Compiles the app and opens it in a browser with "live reload"
npm run build           # Just compiles the app

you can simply add vendor js files by adding it at the begining of the concat.json file:

[
    "../../node_modules/path/to/framework.file",
    "main.jsx"
]

but make sure that you npm install your vendor library before include it.

About

Quite different approach to provide transpiling Stylus and JSX

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published