From 60e8905bcbd2b82c62a2dbeebf37a2874fe80eb0 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Thu, 23 Mar 2017 13:11:31 -0400 Subject: [PATCH] systemjs and angular demos [ci skip] closes #447 h/t @channara closes #453 h/t @Adtiv @paustint closes #538 h/t @hsbilgen closes #547 h/t @Mani2693 --- Makefile | 11 +++++++++- README.md | 7 ++++--- demos/angular/angular.html | 37 ++++++++++++++++++++++++++++++++++ demos/angular/xlsx.core.min.js | 1 + demos/angular/xlsx.full.min.js | 1 + demos/systemjs/Makefile | 3 +++ demos/systemjs/app.js | 4 ++++ demos/systemjs/systemjsnode.js | 17 ++++++++++++++++ docbits/10_install.md | 7 ++++--- 9 files changed, 81 insertions(+), 7 deletions(-) create mode 100644 demos/angular/angular.html create mode 120000 demos/angular/xlsx.core.min.js create mode 120000 demos/angular/xlsx.full.min.js create mode 100644 demos/systemjs/Makefile create mode 100644 demos/systemjs/app.js create mode 100644 demos/systemjs/systemjsnode.js diff --git a/Makefile b/Makefile index a9bd42a..375d303 100644 --- a/Makefile +++ b/Makefile @@ -105,7 +105,12 @@ ctestserv: ## Start a test server on port 8000 @cd tests && python -mSimpleHTTPServer .PHONY: demos -demos: demo-browserify demo-webpack demo-requirejs +demos: demo-angular demo-browserify demo-webpack demo-requirejs demo-systemjs + +.PHONY: demo-angular +demo-angular: ## Run angular demo build + #make -C demos/angular + @echo "start a local server and go to demos/angular/angular.html" .PHONY: demo-browserify demo-browserify: ## Run browserify demo build @@ -122,6 +127,10 @@ demo-requirejs: ## Run requirejs demo build make -C demos/requirejs @echo "start a local server and go to demos/requirejs/requirejs.html" +.PHONY: demo-systemjs +demo-systemjs: ## Run systemjs demo build + make -C demos/systemjs + ## Code Checking .PHONY: lint diff --git a/README.md b/README.md index 1a00cac..04ae9ea 100644 --- a/README.md +++ b/README.md @@ -98,9 +98,10 @@ CDNjs automatically pulls the latest version and makes all versions available at The `demos` directory includes sample projects for: -- [`browserify`](http://browserify.org/) -- [`requirejs`](http://requirejs.org/) -- [`webpack`](https://webpack.js.org/) +- [`browserify`](demos/browserify/) +- [`requirejs`](demos/requirejs/) +- [`systemjs`](demos/systemjs/) +- [`webpack`](demos/webpack/) ### Optional Modules diff --git a/demos/angular/angular.html b/demos/angular/angular.html new file mode 100644 index 0000000..f0dada7 --- /dev/null +++ b/demos/angular/angular.html @@ -0,0 +1,37 @@ + + + + + + Angular Js XLS + + +
+ +
+ + + + + + + + diff --git a/demos/angular/xlsx.core.min.js b/demos/angular/xlsx.core.min.js new file mode 120000 index 0000000..383ccb8 --- /dev/null +++ b/demos/angular/xlsx.core.min.js @@ -0,0 +1 @@ +../../dist/xlsx.core.min.js \ No newline at end of file diff --git a/demos/angular/xlsx.full.min.js b/demos/angular/xlsx.full.min.js new file mode 120000 index 0000000..dbca48d --- /dev/null +++ b/demos/angular/xlsx.full.min.js @@ -0,0 +1 @@ +../../dist/xlsx.full.min.js \ No newline at end of file diff --git a/demos/systemjs/Makefile b/demos/systemjs/Makefile new file mode 100644 index 0000000..7775a97 --- /dev/null +++ b/demos/systemjs/Makefile @@ -0,0 +1,3 @@ +.PHONY: test +test: + node systemjsnode.js diff --git a/demos/systemjs/app.js b/demos/systemjs/app.js new file mode 100644 index 0000000..2737646 --- /dev/null +++ b/demos/systemjs/app.js @@ -0,0 +1,4 @@ +var XLSX_1 = require('../../xlsx.js'); +var XLSX_2 = require('../../dist/xlsx.core.min.js'); +var XLSX_3 = require('../../dist/xlsx.full.min.js'); +var XLSX_N = require('xlsx'); diff --git a/demos/systemjs/systemjsnode.js b/demos/systemjs/systemjsnode.js new file mode 100644 index 0000000..013b5af --- /dev/null +++ b/demos/systemjs/systemjsnode.js @@ -0,0 +1,17 @@ +var SystemJS = require('systemjs'); +SystemJS.config({ + meta: { + '../../xlsx.js': { format: 'global' }, + '../../dist/xlsx.core.min.js': { format: 'global' }, + '../../dist/xlsx.full.min.js': { format: 'global' }, + }, + paths: { + 'npm:': '/usr/local/lib/node_modules/' + }, + map: { + 'xlsx': 'npm:xlsx/xlsx.js', + 'fs': '@node/fs', + 'crypto': '@node/fs' + } +}); +SystemJS.import('./app.js'); diff --git a/docbits/10_install.md b/docbits/10_install.md index 88878e2..825189b 100644 --- a/docbits/10_install.md +++ b/docbits/10_install.md @@ -25,9 +25,10 @@ CDNjs automatically pulls the latest version and makes all versions available at The `demos` directory includes sample projects for: -- [`browserify`](http://browserify.org/) -- [`requirejs`](http://requirejs.org/) -- [`webpack`](https://webpack.js.org/) +- [`browserify`](demos/browserify/) +- [`requirejs`](demos/requirejs/) +- [`systemjs`](demos/systemjs/) +- [`webpack`](demos/webpack/) ### Optional Modules