Skip to content

Commit

Permalink
Modify project to commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
seungwoo-lee committed Jul 11, 2018
1 parent c0dcbc7 commit 3860c97
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 24 deletions.
17 changes: 0 additions & 17 deletions dist/archemist-js-utils.js

This file was deleted.

10 changes: 10 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function moveToAt(array, index, predicate) {
var movingItems = array.filter(predicate);
if (movingItems.length === 0)
return array;
var filteredArray = array.filter(function (item) { return !predicate(item); });
return filteredArray.slice(0, index).concat(movingItems, filteredArray.slice(index + movingItems.length));
}
exports.moveToAt = moveToAt;
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "archemist-js-utils",
"version": "0.0.1",
"version": "0.0.2",
"description": "Javascript utils for archemists",
"scripts": {
"build": "tsc"
Expand All @@ -9,12 +9,12 @@
"type": "git",
"url": "https://github.com/swlee60/archemist-js-utils"
},
"main": "./dist/archemist-js-utils.js",
"main": "./dist/index.js",
"keywords": [
"javascript",
"utils",
"archemist",
"archemist"
],
"author": "Naver Archemists",
"license": "MIT",
"license": "MIT"
}
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"compilerOptions": {
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "system", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation: */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
"outFile": "./dist/archemist-js-utils.js", /* Concatenate and emit output to single file. */
// "outDir": "./", /* Redirect output structure to the directory. */
// "outFile": "./dist/archemist-js-utils.js", /* Concatenate and emit output to single file. */
"outDir": "./dist", /* Redirect output structure to the directory. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
Expand Down

0 comments on commit 3860c97

Please sign in to comment.