Coder Social home page Coder Social logo

al6x / stupid-simple-typescript-web-starter Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 3.0 5 KB

Don't spend your time seting up frameworks or packaging libraries just to make your TypeScirpt to work in Browser

CSS 19.35% HTML 58.24% TypeScript 22.40%
typescript webpack amd

stupid-simple-typescript-web-starter's Introduction

TypeScript is good. But the supporting infrastructure around it is bloated and overengineered.

Don't spend your time seting up frameworks or packaging libraries just to make your TypeScirpt to work in Browser. No need for overingeenered and bloated shit like WebPack, Babel, Require.JS, System.JS etc.

TypeScript can produce the build all by itself. Use this repo as an example.

Run

  • Clone repository
  • npm install
  • Open terminal and type npm run build-and-watch
  • Open another terminal tab and type npm run server
  • Open Browser http://localhost:8080

Details

  • Yes, you may need WebPack in complex cases to produce optimised build.
  • TypeScript produces the build but not the loader. For some strange reason TypeScript Team refuses to add 10 lines required for the Loader. That's why those 10 lines of code provided separately.
  • Your 10 lines loader don't implement full AMD spec! Yes, because - fuck AMD spec. I need to make my small TypeScript project work without spending my valuable time on outdated and overingeenered shit like full AMD spec.

stupid-simple-typescript-web-starter's People

Contributors

al6x avatar

Stargazers

Martin Molema avatar Victor Martins avatar RealGecko avatar Sebastien ROBERT avatar Ben Rowe avatar Eric Waldman avatar

Watchers

 avatar

stupid-simple-typescript-web-starter's Issues

sugges for tsconfig <question>

@al6x there are two imports in HTML, i think than can be better adding to tsconfig.json this code:

...
"include": [
  "./src/vendor/ten-lines-typescript-amd-loader.js",
  "**/*.ts"
],
...

that is going to mix all files, setting the ten-lines-typescript-amd-loader.js code first.
In fact doing this we can add any loader in the include prop (like full module import), is not necesary a full module bundler (like webpack).
Do you think than it is a good idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.