Skip to content

Commit

Permalink
Use transpiled version of router inside npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
reneviering committed Dec 23, 2016
1 parent 036b2b3 commit e767237
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 23 deletions.
1 change: 1 addition & 0 deletions dist/umd/vanilla-ui-router.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 6 additions & 11 deletions dist/vanilla-ui-router.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.vanillaUIRouter = global.vanillaUIRouter || {})));
}(this, (function (exports) { 'use strict';
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var parseRouteParamToCorrectType = function parseRouteParamToCorrectType(paramValue) {
if (!isNaN(paramValue)) {
Expand Down Expand Up @@ -60,8 +58,10 @@ var findMatchingRouteIdentifier = function findMatchingRouteIdentifier(currentHa
})[0];
};

var XMLHttpRequestFactory = window.XMLHttpRequest;

var loadTemplate = function loadTemplate(templateUrl, successCallback) {
var xhr = new XMLHttpRequest();
var xhr = new XMLHttpRequestFactory();
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
successCallback(xhr.responseText);
Expand Down Expand Up @@ -183,8 +183,3 @@ var createRouter = function createRouter(domEntryPoint) {
};

exports.createRouter = createRouter;

Object.defineProperty(exports, '__esModule', { value: true });

})));
//# sourceMappingURL=vanilla-ui-router.js.map
1 change: 0 additions & 1 deletion dist/vanilla-ui-router.js.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/vanilla-ui-router.min.js

This file was deleted.

9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@
"homepage": "https://github.com/micromata/vanilla-ui-router",
"author": "René Viering",
"repository": "micromata/vanilla-ui-router",
"main": "index.js",
"main": "dist/vanilla-ui-router.js",
"files": [
"dist",
"core/dataProvider.js",
"core/routeParams.js",
"core/templates.js",
"core/httpRequestFactory.js",
"index.js"
"dist"
],
"scripts": {
"test": "jest --coverage",
Expand Down
4 changes: 2 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import sourcemaps from 'rollup-plugin-sourcemaps';
export default {
entry: 'index.js',
dest: 'dist/vanilla-ui-router.js',
format: 'umd',
format: 'cjs',
moduleName: 'vanillaUIRouter',
sourceMap: true,
sourceMap: false,
plugins: [
resolve({
jsnext: true,
Expand Down
2 changes: 1 addition & 1 deletion rollup.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import commonjs from 'rollup-plugin-commonjs';

export default {
entry: 'index.js',
dest: 'dist/vanilla-ui-router.min.js',
dest: 'dist/umd/vanilla-ui-router.min.js',
format: 'umd',
moduleName: 'vanillaUIRouter',
plugins: [
Expand Down

0 comments on commit e767237

Please sign in to comment.