2

How to use babel with simple HTML file without build system?

The command-line TypeScript compiler can be installed as a Node.js package.

INSTALL npm install -g typescript COMPILE tsc helloworld.ts 

Than I added compiled file to HTML and it works fine.

How I can implement it with babel?

Fox example write es6 code, than compile in terminal and add this compiled script to index.hmtl.

1 Answer 1

2

http://babeljs.io/docs/setup/#installation - choose CLI

INSTALL npm install -g babel-cli COMPILE babel helloworld.es6.js -d helloworld.js 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.