Skip to content

thatseeyou/jspm-typescript-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project was based on jspm-typescript-seed.

You can go to demo sites with github pages.

install and run

$ git clone https://github.com/thatseeyou/jspm-typescript-examples.git
$ cd jspm-typescript-examples
$ npm install
$ jspm install
$ npm run serve

bundle / unbundle

Current uploaded *.html use bundle file(build.js). So if your edit source codes, you must bundle modules again.

$ npm run bundle

If bundle file(build.js) does not exist, systemjs loads modules dynamically. You should unbundle if you edit codes frequently. Don't care 404 NOT FOUND for build.js.

$ npm run unbundle

Using unbundled modules requires URL start with /. Github pages which start with /jspm-typescript-examples is not the case.

Examples

  • Native Promise [Demo]

    $ vi docs/tsconfig.json
    ...
        "lib": [
            "es2015",
            "dom"
        ],
    ...
    
  • rxjs [Demo]

    $ jspm install rxjs
    $ vi docs/tsconfig.json
    ...
        "baseUrl": "..",
        "paths": {
            "rxjs" : ["jspm_packages/npm/rxjs@5.2.0"],
            "rxjs/*" : ["jspm_packages/npm/rxjs@5.2.0/*"],
            "*": [
                "node_modules/@types/*",
                "types/*"   // custom declarations
            ]
        }
    ...
    
  • immutable [Demo]

    $ jspm install immutable
    $ vi docs/tsconfig.json
    ...
        "baseUrl": "..",
        "paths": {
            ...
            "immutable" : ["jspm_packages/npm/immutable@3.8.1/dist"],
            ...
        }
    ...
    
  • d3/d3-selection [Demo]

    $ jspm install npm:d3-selection
    $ npm install --save @types/d3-selection
    
  • gionkunz/chartist-js [Demo]

    $ jspm install chartist
    $ npm install --save @types/chartist
    
  • wagerfield/parallax [Demo]

    $ jspm install parallax=github:wagerfield/parallax
    $ jspm install parallax=github:wagerfield/parallax -o '{ main: "deploy/jquery.parallax.js" }'
    
  • pixelcog/parallax.js & jquery [Demo]

    jquery-parallax.js does not support jquery 3.X.

    $ jspm install jquery@^2.2.4
    $ jspm install npm:jquery-parallax.js
    
  • stevenwanderski/bxslider-4 [Demo]

    $ jspm install npm:bxslider -o '{ main: "dist/jquery.bxslider.js" }'
    $ npm install -S @types/dw-bxslider-4
    
  • chinchang/screenlog.js [Demo]

    $ jspm install npm:screenlog
    $ vi types/log/index.d.ts
    
  • adamschwartz/log [Demo]

    $ jspm install log=github:adamschwartz/log 
    $ vi types/log/index.d.ts
    
  • codemirror/CodeMirror [Demo]

    $ jspm install npm:codemirror
    $ npm install --save @types/codemirror
    
  • MikeMcl/decimal.js [Demo]

    $ jspm install decimal.js
    $ npm install @types/decimal.js
    $ cp -a node_modules/@types/decimal.js types/
    $ npm uninstall @types/decimal.js
    $ vi tsconfig.json
    ...
        "baseUrl": "..",
        "paths": {
            "decimal.js" : ["types/decimal.js/index.d.ts"],
        }
    ...
    $ vi types/decimal.js/index.d.ts
    ...
    (add/change declarations)
    ...
    
  • showdownjs/showdown [Demo]

    $ jspm install showdown
    $ npm install --save @types/showdown
    

Releases

No releases published

Packages

No packages published