├── .clasp.json ├── .gitignore ├── .gitmodules ├── CHANGELOG.md ├── LICENSE ├── README.md ├── build └── lodashgs.js ├── gulpfile.js ├── package-lock.json ├── package.json └── src ├── appsscript.json └── load.js /.clasp.json: -------------------------------------------------------------------------------- 1 | { 2 | "scriptId": "1SQ0PlSMwndIuOAgtVJdjxsuXueECtY9OGejVDS37ckSVbMll73EXf2PW", 3 | "rootDir": "build" 4 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | build/appsscript.json 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lodash"] 2 | path = lodash 3 | url = git@github.com:lodash/lodash.git -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | - Upgrade to 1.0.2-1 2 | - Merge pull request #16 from contributorpw/develop 3 | - Clear build. Update bulding 4 | - Merge pull request #15 from contributorpw/develop 5 | - Update manifest to v8 6 | - Merge pull request #13 from contributorpw/develop 7 | - Merge pull request #12 from contributorpw/upgrade 8 | - Refresh npm modules 9 | - Upgrade to 4.17.21 10 | - Update readme 11 | - Merge pull request #8 from contributorpw/dependabot/npm_and_yarn/ini-1.3.8 12 | - Bump ini from 1.3.5 to 1.3.8 13 | - Merge pull request #7 from contributorpw/develop 14 | - Upgrade to 4.17.20 15 | - 4.17.20 16 | - Update npm 17 | - 4.17.15 18 | - 4.17.15 19 | - npm up 20 | - Readme lint 21 | - 4.17.11 and lazy loading 22 | - change gapps to clasp 23 | - rename gs to js 24 | - npm update 25 | - Reset to lodash 4.17.11 26 | - Update gitmodules 27 | - Create LICENSE 28 | - Comments & Links 29 | - gulpfile 30 | - Move to MIT Lic, fix README typo 31 | - 4.17.4 32 | - Initial commit 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Alexander Ivanov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LodashGS 2 | 3 | Lodash for Google Apps Script is a library that enables the use of the [lodash.js](https://lodash.com) library in [Google Apps Script](https://developers.google.com/apps-script/). 4 | API docs are available [here](https://script.google.com/macros/library/versions/d/1SQ0PlSMwndIuOAgtVJdjxsuXueECtY9OGejVDS37ckSVbMll73EXf2PW). 5 | 6 | ## Adding the library to your project 7 | 8 | Lodash for Google Apps Script is made available as a script library. This is how you add it to your project: 9 | 10 | 1. Select "Resources" > "Libraries..." in the Google Apps Script editor. 11 | 2. Enter the project key (`1SQ0PlSMwndIuOAgtVJdjxsuXueECtY9OGejVDS37ckSVbMll73EXf2PW`) in the "Find a Library" field, and choose "Select". (If you have copied the library, enter instead the project key of your copy.) 12 | 3. Select the highest version number, and choose Lodash as the identifier. (Do not turn on Development Mode unless you know what you are doing. The development version may not work.) 13 | 4. Press Save. You can now use the Lodash library in your code. 14 | 15 | ### Custom copying 16 | 17 | You can find the current build for the Apps Script platform in the [build](./build) folder. 18 | 19 | ## Versions 20 | 21 | - The `6` version (full description `v1.0.2-1 (4.17.21)`) of the LodashGS corresponds to the `4.17.21` version of the Lodash. 22 | 23 | ## Loading the library 24 | 25 | To load LodashGS: 26 | 27 | ```js 28 | var _ = LodashGS.load(); 29 | ``` 30 | 31 | Same for v8: 32 | 33 | ```js 34 | const _ = LodashGS.load(); 35 | ``` 36 | 37 | ## Copying the library 38 | 39 | A Google Apps Script project for Lodash is available [here](https://script.google.com/d/1SQ0PlSMwndIuOAgtVJdjxsuXueECtY9OGejVDS37ckSVbMll73EXf2PW/edit?usp=sharing). 40 | 41 | To copy the library, Select "File" > "Make a copy..." in the Google 42 | Apps Script editor. 43 | 44 | ## Testing the library 45 | 46 | {TO DO} 47 | 48 | ## Links 49 | 50 | - [Underscore for Google Apps Script](https://github.com/simula-innovation/gas-underscore) 51 | - [Differences between lodash and underscore](http://stackoverflow.com/questions/13789618) 52 | 53 | ## License 54 | 55 | Lodash for Google Apps Script is released under the MIT license. 56 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var include = require('gulp-include'); 3 | var del = require('del'); 4 | var rename = require('gulp-rename'); 5 | 6 | // Copy files of the project 7 | gulp.task('copy', function () { 8 | return gulp.src('src/appsscript.json').pipe(gulp.dest('build')); 9 | }); 10 | 11 | // Clear the build folder 12 | gulp.task('del', function () { 13 | return del('build/*'); 14 | }); 15 | 16 | gulp.task('assets', function () { 17 | return gulp.src('./src/appsscript.json').pipe(gulp.dest('build')); 18 | }); 19 | 20 | // The default task of gulp 21 | gulp.task( 22 | 'default', 23 | gulp.series( 24 | 'del', 25 | 'copy', 26 | function () { 27 | return gulp 28 | .src('./src/load.js') 29 | .pipe(include()) 30 | .on('error', console.log) 31 | .pipe(rename('lodashgs.js')) 32 | .pipe(gulp.dest('build')); 33 | }, 34 | 'assets' 35 | ) 36 | ); 37 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lodashgs", 3 | "version": "1.0.2-3", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "gulp", 8 | "deploy": "gulp && clasp push" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/contributorpw/lodashgs.git" 13 | }, 14 | "author": "", 15 | "license": "MIT", 16 | "bugs": { 17 | "url": "https://github.com/contributorpw/lodashgs/issues" 18 | }, 19 | "homepage": "https://github.com/contributorpw/lodashgs#readme", 20 | "devDependencies": { 21 | "@google/clasp": "^2.4.1", 22 | "del": "^6.1.1", 23 | "gulp": "^4.0.2", 24 | "gulp-include": "^2.4.1", 25 | "gulp-rename": "^2.0.0" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/appsscript.json: -------------------------------------------------------------------------------- 1 | { 2 | "timeZone": "Europe/Moscow", 3 | "dependencies": { 4 | }, 5 | "exceptionLogging": "STACKDRIVER", 6 | "runtimeVersion": "V8" 7 | } -------------------------------------------------------------------------------- /src/load.js: -------------------------------------------------------------------------------- 1 | var make = function(){ 2 | // lodas.js placeholder -- begin 3 | //=include ./../lodash/lodash.js 4 | // lodas.js placeholder -- end 5 | }; 6 | 7 | function load() { 8 | make(); 9 | return _; 10 | } --------------------------------------------------------------------------------