diff --git a/.gitignore b/.gitignore index 804a1a6..a951c91 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build js/templates.js +node_modules vendor \ No newline at end of file diff --git a/Makefile b/Makefile index 4769878..d5780a7 100644 --- a/Makefile +++ b/Makefile @@ -33,47 +33,27 @@ build: deps deps: mkdir -p vendor rm -rf vendor/* - - wget http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v4.0.5.js - mv handlebars-v4.0.5.js vendor/handlebars.js - - wget https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.js - mv isotope.pkgd.js vendor/ - - wget https://github.com/yabwe/medium-editor/archive/master.zip -O medium-editor.zip - unzip medium-editor.zip - mv medium-editor-master/dist/js/medium-editor.js vendor/ - mv medium-editor-master/dist/css/medium-editor.css vendor/ - mv medium-editor-master/dist/css/themes/beagle.css vendor/ - rm -R medium-editor-master - rm medium-editor.zip - - wget https://github.com/varun-raj/medium-editor-autolist/raw/master/dist/autolist.js - mv autolist.js vendor/ + npm i + cp node_modules/handlebars/dist/handlebars.js vendor/ + cp node_modules/isotope-layout/dist/isotope.pkgd.js vendor/ + cp node_modules/medium-editor/dist/js/medium-editor.js vendor/ + cp node_modules/medium-editor/dist/css/medium-editor.css vendor/ + cp node_modules/medium-editor/dist/css/themes/beagle.css vendor/ + cp node_modules/medium-editor-autolist/dist/autolist.js vendor/ depsmin: mkdir -p vendor rm -rf vendor/* - - wget http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v4.0.5.js - mv handlebars-v4.0.5.js vendor/handlebars.js - - wget https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.min.js - mv isotope.pkgd.min.js vendor/isotope.pkgd.js - - wget https://github.com/yabwe/medium-editor/archive/master.zip -O medium-editor.zip - unzip medium-editor.zip - mv medium-editor-master/dist/js/medium-editor.min.js vendor/medium-editor.js - mv medium-editor-master/dist/css/medium-editor.min.css vendor/medium-editor.css - mv medium-editor-master/dist/css/themes/beagle.min.css vendor/beagle.css - rm -R medium-editor-master - rm medium-editor.zip - - wget https://github.com/varun-raj/medium-editor-autolist/raw/master/dist/autolist.min.js - mv autolist.min.js vendor/autolist.js + npm i + cp node_modules/handlebars/dist/handlebars.min.js vendor/ + cp node_modules/isotope-layout/dist/isotope.pkgd.min.js vendor/ + cp node_modules/medium-editor/dist/js/medium-editor.min.js vendor/ + cp node_modules/medium-editor/dist/css/medium-editor.min.css vendor/ + cp node_modules/medium-editor/dist/css/themes/beagle.min.css vendor/ + cp node_modules/medium-editor-autolist/dist/autolist.min.js vendor/ js-templates: - handlebars js/templates -f js/templates.js + node_modules/handlebars/bin/handlebars js/templates -f js/templates.js clean: rm -rf $(build_dir) diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..97c6e21 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,131 @@ +{ + "name": "quicknotes", + "version": "0.1.9", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "optional": true + }, + "desandro-matches-selector": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/desandro-matches-selector/-/desandro-matches-selector-2.0.2.tgz", + "integrity": "sha1-cXvu1NwT59jzdi9wem1YpndCGOE=" + }, + "ev-emitter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ev-emitter/-/ev-emitter-1.1.1.tgz", + "integrity": "sha512-ipiDYhdQSCZ4hSbX4rMW+XzNKMD1prg/sTvoVmSLkuQ1MVlwjJQQA+sW8tMYR3BLUr9KjodFV4pvzunvRhd33Q==" + }, + "fizzy-ui-utils": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fizzy-ui-utils/-/fizzy-ui-utils-2.0.7.tgz", + "integrity": "sha512-CZXDVXQ1If3/r8s0T+v+qVeMshhfcuq0rqIFgJnrtd+Bu8GmDmqMjntjUePypVtjHXKJ6V4sw9zeyox34n9aCg==", + "requires": { + "desandro-matches-selector": "^2.0.0" + } + }, + "get-size": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/get-size/-/get-size-2.0.3.tgz", + "integrity": "sha512-lXNzT/h/dTjTxRbm9BXb+SGxxzkm97h/PCIKtlN/CBCxxmkkIVV21udumMS93MuVTDX583gqc94v3RjuHmI+2Q==" + }, + "handlebars": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.1.tgz", + "integrity": "sha512-C29UoFzHe9yM61lOsIlCE5/mQVGrnIOrOq7maQl76L7tYPCgC1og0Ajt6uWnX4ZTxBPnjw+CUvawphwCfJgUnA==", + "requires": { + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + } + }, + "isotope-layout": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/isotope-layout/-/isotope-layout-3.0.6.tgz", + "integrity": "sha512-z2ZKablhocXhoNyWwzJPFd7u7FWbYbVJA51Nvsqsod8jH2ExGc1SwDsSWKE54e3PhXzqf2yZPhFSq/c2MR1arw==", + "requires": { + "desandro-matches-selector": "^2.0.0", + "fizzy-ui-utils": "^2.0.4", + "get-size": "^2.0.0", + "masonry-layout": "^4.1.0", + "outlayer": "^2.1.0" + } + }, + "masonry-layout": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/masonry-layout/-/masonry-layout-4.2.2.tgz", + "integrity": "sha512-iGtAlrpHNyxaR19CvKC3npnEcAwszXoyJiI8ARV2ePi7fmYhIud25MHK8Zx4P0LCC4d3TNO9+rFa1KoK1OEOaA==", + "requires": { + "get-size": "^2.0.2", + "outlayer": "^2.1.0" + } + }, + "medium-editor": { + "version": "5.23.3", + "resolved": "https://registry.npmjs.org/medium-editor/-/medium-editor-5.23.3.tgz", + "integrity": "sha512-he9/TdjX8f8MGdXGfCs8AllrYnqXJJvjNkDKmPg3aPW/uoIrlRqtkFthrwvmd+u4QyzEiadhCCM0EwTiRdUCJw==" + }, + "medium-editor-autolist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/medium-editor-autolist/-/medium-editor-autolist-1.0.1.tgz", + "integrity": "sha1-K+QPb3To9LX6fosnTj9QXCrqfN0=", + "requires": { + "medium-editor": "^5.23.0" + } + }, + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "outlayer": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/outlayer/-/outlayer-2.1.1.tgz", + "integrity": "sha1-KYY7beEOpdrf/8rfoNcokHOH6aI=", + "requires": { + "ev-emitter": "^1.0.0", + "fizzy-ui-utils": "^2.0.0", + "get-size": "^2.0.2" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "uglify-js": { + "version": "3.6.7", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.7.tgz", + "integrity": "sha512-4sXQDzmdnoXiO+xvmTzQsfIiwrjUCSA95rSP4SEd8tDb51W2TiDOlL76Hl+Kw0Ie42PSItCW8/t6pBNCF2R48A==", + "optional": true, + "requires": { + "commander": "~2.20.3", + "source-map": "~0.6.1" + } + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..b555cb5 --- /dev/null +++ b/package.json @@ -0,0 +1,29 @@ +{ + "name": "quicknotes", + "version": "0.1.9", + "description": "Quick notes with a basic rich text", + "main": "script.js", + "directories": { + "doc": "doc", + "test": "tests" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/matiasdelellis/quicknotes.git" + }, + "author": "Matias De lellis ", + "license": "AGPL-3.0-or-later", + "bugs": { + "url": "https://github.com/matiasdelellis/quicknotes/issues" + }, + "homepage": "https://github.com/matiasdelellis/quicknotes#readme", + "dependencies": { + "handlebars": "^4.5.1", + "isotope-layout": "^3.0.6", + "medium-editor": "^5.23.3", + "medium-editor-autolist": "^1.0.1" + } +}