Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typescript support #285

Closed
IzumiSy opened this issue Oct 14, 2017 · 2 comments
Closed

typescript support #285

IzumiSy opened this issue Oct 14, 2017 · 2 comments

Comments

@IzumiSy
Copy link

IzumiSy commented Oct 14, 2017

I would like to use bankai with TypeScript transpiler, but README does not have any section to introduce transpilers. Do you have any guidance?

@Flet
Copy link
Collaborator

Flet commented Oct 15, 2017

Solution will be similar to #262 I think

@cancerberoSgx
Copy link

@IzumiSy I don't think is responsibility of this tool to run transpilers. I think the idea of the project is to accept a browserify valid project as input. generating such a project from a TS project is just a matter of having this tsconfig.json:

{
  "compilerOptions": {
    "target": "es2018",   
    "module": "commonjs", 
    "moduleResolution": "node",
    "jsx": "react",
    "lib": ["es2018", "dom"],
    "outDir": "./dist", 
    "rootDir": "./src",
    "strict": true
  }
}

then just execute tsc before bankai:

tsc && bankai build dist/src/index.js 

My opinion is that we, the users, should be responsible of the build workflow and each tool should be focused on a particular problem, and not be responsible of the workflow. This way I can switch bankai with other optimization tool easily since my build is not dependent on it just on a command file input-output contract.

And in any case, if there's a tool responsible of implementing the build workflow / chain, it should be a tool specialized on that (like gulp orchestrator) and I don't think bankai applies here. Just an opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants