Skip to content

Instantly share code, notes, and snippets.

@jdalton
Last active July 3, 2024 02:00
Show Gist options
  • Save jdalton/938ea49ab3919f1c046c to your computer and use it in GitHub Desktop.
Save jdalton/938ea49ab3919f1c046c to your computer and use it in GitHub Desktop.

Revisions

  1. jdalton revised this gist Aug 10, 2016. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions npm-packages.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1 @@
    node ../lodash-cli/bin/lodash modularize exports=npm -o ./

    basesorteduniqby
  2. jdalton revised this gist Apr 21, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion npm-packages.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1,3 @@
    node ../lodash-cli/bin/lodash modularize exports=npm -o ./
    node ../lodash-cli/bin/lodash modularize exports=npm -o ./

    basesorteduniqby
  3. jdalton revised this gist Feb 16, 2016. 3 changed files with 0 additions and 9 deletions.
    3 changes: 0 additions & 3 deletions docdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +0,0 @@
    node ../docdown/bin/docdown ./lodash.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/4.1.0/lodash.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v4.1.0</span>" hash="github"

    node ../docdown/bin/docdown ./lodash.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/4.1.0/lodash.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v4.1.0</span>" hash="default"
    3 changes: 0 additions & 3 deletions lodash-amd.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +0,0 @@
    node ../lodash-cli/bin/lodash modularize exports=amd -o ./modern && node ../lodash-cli/bin/lodash exports=amd -d -o ./modern/main.js

    node ../lodash-cli/bin/lodash modularize compat exports=amd -o ./compat && node ../lodash-cli/bin/lodash compat exports=amd -d -o ./compat/main.js
    3 changes: 0 additions & 3 deletions lodash-node.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +0,0 @@
    node ../lodash-cli/bin/lodash modularize exports=node -o ./modern && node ../lodash-cli/bin/lodash exports=node -d -o ./modern/index.js

    node ../lodash-cli/bin/lodash modularize compat exports=node -o ./compat && node ../lodash-cli/bin/lodash compat exports=node -d -o ./compat/index.js
  4. jdalton revised this gist Feb 1, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion npm.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    node ../lodash-cli/bin/lodash modularize exports=node -o ./ && node ../lodash-cli/bin/lodash -d -o ./lodash.js
    node ../lodash-cli/bin/lodash modularize exports=node -o ./foo && node ../lodash-cli/bin/lodash -d -o ./foo/lodash.js
  5. jdalton revised this gist Jan 25, 2016. 2 changed files with 3 additions and 3 deletions.
    4 changes: 2 additions & 2 deletions docdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../docdown/bin/docdown ./lodash.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/4.0.0/lodash.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v4.0.0</span>" hash="github"
    node ../docdown/bin/docdown ./lodash.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/4.1.0/lodash.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v4.1.0</span>" hash="github"

    node ../docdown/bin/docdown ./lodash.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/4.0.0/lodash.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v4.0.0</span>" hash="default"
    node ../docdown/bin/docdown ./lodash.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/4.1.0/lodash.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v4.1.0</span>" hash="default"
    2 changes: 1 addition & 1 deletion lodash-builds.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    npm run build
    node ../lodash-cli/bin/lodash -o ./dist/lodash.js
    node ../lodash-cli/bin/lodash core -o ./dist/lodash.core.js
    node ../lodash-cli/bin/lodash core -o ./dist/lodash.core.js
  6. jdalton revised this gist Jan 13, 2016. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions npm-packages.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1 @@
    node ../lodash-cli/bin/lodash modularize exports=npm -o ./

    before/after/once
    node ../lodash-cli/bin/lodash modularize exports=npm -o ./
  7. jdalton revised this gist Jan 12, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion npm-packages.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1,3 @@
    node ../lodash-cli/bin/lodash modularize exports=npm -o ./
    node ../lodash-cli/bin/lodash modularize exports=npm -o ./

    before/after/once
  8. jdalton revised this gist Jan 11, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion docdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../docdown/bin/docdown ./lodash.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/4.0.0/lodash.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v4.0.0</span>" hash="github"

    node ../docdown/bin/docdown ./lodash.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/4.0.0/lodash.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v4.0.0</span>" hash="default"
    node ../docdown/bin/docdown ./lodash.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/4.0.0/lodash.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v4.0.0</span>" hash="default"
  9. jdalton revised this gist Jan 11, 2016. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion org.js
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ var util = require('./lib/util.js'),
    fs = util.fs,
    path = util.path;

    var _ = require('lodash-compat'),
    var _ = require('lodash'),
    glob = require('glob'),
    moment = require('moment'),
    ncp = require('ncp').ncp;
    2 changes: 1 addition & 1 deletion tag.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    'use strict';

    var _ = require('lodash-compat'),
    var _ = require('lodash'),
    childProcess = require('child_process'),
    execSync = childProcess.execSync,
    semver = require('semver'),
  10. jdalton revised this gist Jan 10, 2016. 2 changed files with 4 additions and 2 deletions.
    4 changes: 3 additions & 1 deletion lodash-builds.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1,3 @@
    node ../lodash-cli/bin/lodash modern -o ./lodash.js
    npm run build
    node ../lodash-cli/bin/lodash -o ./dist/lodash.js
    node ../lodash-cli/bin/lodash core -o ./dist/lodash.core.js
    2 changes: 1 addition & 1 deletion npm-packages.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    node ../lodash-cli/bin/lodash modern modularize exports=npm -o ./
    node ../lodash-cli/bin/lodash modularize exports=npm -o ./
  11. jdalton revised this gist Jan 10, 2016. 4 changed files with 3 additions and 9 deletions.
    2 changes: 0 additions & 2 deletions amd.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1 @@
    node ../lodash-cli/bin/lodash modularize exports=amd -o ./ && node ../lodash-cli/bin/lodash exports=amd -d -o ./main.js

    node ../lodash-cli/bin/lodash modularize compat exports=amd -o ./ && node ../lodash-cli/bin/lodash compat exports=amd -d -o ./main.js
    4 changes: 2 additions & 2 deletions docdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.10.1/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.10.1</span>" hash="github"
    node ../docdown/bin/docdown ./lodash.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/4.0.0/lodash.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v4.0.0</span>" hash="github"

    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.10.1/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.10.1</span>" hash="default"
    node ../docdown/bin/docdown ./lodash.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/4.0.0/lodash.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v4.0.0</span>" hash="default"
    2 changes: 0 additions & 2 deletions lodash-builds.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1 @@
    node ../lodash-cli/bin/lodash modern -o ./lodash.js

    node ../lodash-cli/bin/lodash compat -o ./lodash.js
    4 changes: 1 addition & 3 deletions npm.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1 @@
    node ../lodash-cli/bin/lodash modularize exports=node -o ./ && node ../lodash-cli/bin/lodash -d -o ./index.js

    node ../lodash-cli/bin/lodash modularize compat exports=node -o ./ && node ../lodash-cli/bin/lodash compat -d -o ./index.js
    node ../lodash-cli/bin/lodash modularize exports=node -o ./ && node ../lodash-cli/bin/lodash -d -o ./lodash.js
  12. jdalton revised this gist Dec 7, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion amd.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../lodash-cli/bin/lodash modularize modern exports=amd -o ./ && node ../lodash-cli/bin/lodash modern exports=amd -d -o ./main.js
    node ../lodash-cli/bin/lodash modularize exports=amd -o ./ && node ../lodash-cli/bin/lodash exports=amd -d -o ./main.js

    node ../lodash-cli/bin/lodash modularize compat exports=amd -o ./ && node ../lodash-cli/bin/lodash compat exports=amd -d -o ./main.js
  13. jdalton revised this gist Nov 9, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion es
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    node ../lodash-cli/bin/lodash modularize exports=es -o ./foo
    node ../lodash-cli/bin/lodash modularize exports=es -o ./
  14. jdalton revised this gist Sep 2, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion es
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    node ../lodash-cli/bin/lodash modularize modern exports=es -o ./
    node ../lodash-cli/bin/lodash modularize exports=es -o ./foo
  15. jdalton revised this gist Aug 21, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion npm.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../lodash-cli/bin/lodash modularize modern exports=node -o ./ && node ../lodash-cli/bin/lodash modern -d -o ./index.js
    node ../lodash-cli/bin/lodash modularize exports=node -o ./ && node ../lodash-cli/bin/lodash -d -o ./index.js

    node ../lodash-cli/bin/lodash modularize compat exports=node -o ./ && node ../lodash-cli/bin/lodash compat -d -o ./index.js
  16. jdalton revised this gist Aug 9, 2015. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion lodash-amd.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../lodash-cli/bin/lodash modularize modern exports=amd -o ./modern && node ../lodash-cli/bin/lodash modern exports=amd -d -o ./modern/main.js
    node ../lodash-cli/bin/lodash modularize exports=amd -o ./modern && node ../lodash-cli/bin/lodash exports=amd -d -o ./modern/main.js

    node ../lodash-cli/bin/lodash modularize compat exports=amd -o ./compat && node ../lodash-cli/bin/lodash compat exports=amd -d -o ./compat/main.js
    2 changes: 1 addition & 1 deletion lodash-node.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../lodash-cli/bin/lodash modularize modern exports=node -o ./modern && node ../lodash-cli/bin/lodash modern exports=node -d -o ./modern/index.js
    node ../lodash-cli/bin/lodash modularize exports=node -o ./modern && node ../lodash-cli/bin/lodash exports=node -d -o ./modern/index.js

    node ../lodash-cli/bin/lodash modularize compat exports=node -o ./compat && node ../lodash-cli/bin/lodash compat exports=node -d -o ./compat/index.js
  17. jdalton revised this gist Jul 8, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions docdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.11.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.11.0</span>" hash="github"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.10.1/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.10.1</span>" hash="github"

    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.11.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.11.0</span>" hash="default"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.10.1/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.10.1</span>" hash="default"
  18. jdalton revised this gist Jul 8, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions docdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.10.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.10.0</span>" hash="github"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.11.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.11.0</span>" hash="github"

    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.10.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.10.0</span>" hash="default"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.11.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.11.0</span>" hash="default"
  19. jdalton revised this gist Jun 17, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions docdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.9.3/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.9.3</span>" hash="github"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.10.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.10.0</span>" hash="github"

    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.9.3/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.9.3</span>" hash="default"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.10.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.10.0</span>" hash="default"
  20. jdalton revised this gist May 25, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions docdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.9.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.9.0</span>" hash="github"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.9.3/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.9.3</span>" hash="github"

    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.9.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.9.0</span>" hash="default"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.9.3/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.9.3</span>" hash="default"
  21. jdalton revised this gist May 25, 2015. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions tag.js
    Original file line number Diff line number Diff line change
    @@ -25,10 +25,11 @@ pairs.sort(function(a, b) {
    });

    pairs = pairs.map(function(pair) {
    var tag = pair[0] + (branch == 'master' ? '' : '-' + branch);
    return [
    //'git checkout ' + parts[0] + '-npm-packages && git commit --amend --no-edit --date "`date`"'//,
    'git tag -f -a -m ' + pair[0] + '-' + branch + ' "' + pair[0] + '-' + branch + '" ' + pair[1],
    'git push -f origin ' + pair[0] + '-' + branch
    'git tag -f -a -m ' + tag + ' "' + tag + '" ' + pair[1],
    'git push -f origin ' + tag
    ];
    });

  22. jdalton revised this gist May 25, 2015. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions tag.js
    Original file line number Diff line number Diff line change
    @@ -27,7 +27,8 @@ pairs.sort(function(a, b) {
    pairs = pairs.map(function(pair) {
    return [
    //'git checkout ' + parts[0] + '-npm-packages && git commit --amend --no-edit --date "`date`"'//,
    'git tag -f -a -m ' + pair[0] + '-' + branch + ' "' + pair[0] + '-' + branch + '" ' + pair[1]
    'git tag -f -a -m ' + pair[0] + '-' + branch + ' "' + pair[0] + '-' + branch + '" ' + pair[1],
    'git push -f origin ' + pair[0] + '-' + branch
    ];
    });

    @@ -36,6 +37,6 @@ _.each(pairs, function(pair, index) {
    _.delay(function() {
    console.log(command)
    execSync(command);
    }, 10 * index);
    }, 1000 * index);
    });
    });
  23. jdalton revised this gist May 25, 2015. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions tag.js
    Original file line number Diff line number Diff line change
    @@ -31,9 +31,11 @@ pairs = pairs.map(function(pair) {
    ];
    });

    _.each(pairs, function(pair) {
    pair.forEach(function(command) {
    console.log(command)
    execSync(command);
    _.each(pairs, function(pair, index) {
    _.each(pair, function(command) {
    _.delay(function() {
    console.log(command)
    execSync(command);
    }, 10 * index);
    });
    });
  24. jdalton revised this gist May 25, 2015. 1 changed file with 26 additions and 10 deletions.
    36 changes: 26 additions & 10 deletions tag.js
    Original file line number Diff line number Diff line change
    @@ -3,21 +3,37 @@
    var _ = require('lodash-compat'),
    childProcess = require('child_process'),
    execSync = childProcess.execSync,
    semver = require('semver'),
    spawn = childProcess.spawn;

    var reString = /(["'])(?:(?!\1)[^\n\\]|\\.)*?\1/g;
    var branch = 'npm-packages';

    var git = spawn('git', ['log', 'npm-packages', '--pretty=format:"%s | %h"']);
    var reLine = /^.*$/gm;

    git.stdout.on('data', function(data) {
    var commands = _.map(data.toString().match(reString), function(value) {
    var parts = _.map(_.trim(value, '"\'').split('|'), _.trim);
    parts[0] = _.result(/\d+(?:\.\d+)*/.exec(parts[0]), 0, '');
    return 'git tag -f -a -m ' + parts[0] + '-npm-packages "' + parts[0] + '-npm-packages" ' + parts[1];
    });
    var output = execSync('git log ' + branch + ' --pretty=format:"%s | %h"').toString();

    var pairs = _.map(output.match(reLine), function(value) {
    var pair = _.map(_.trim(value, '"\'').split('|'), _.trim);
    pair[0] = _.result(/\d+(?:\.\d+)*/.exec(pair[0]), 0, '');
    return pair;
    });

    pairs = _.filter(pairs, '0');

    pairs.sort(function(a, b) {
    return semver.gt(a[0], b[0]) ? 1 : (semver.lt(a[0], b[0]) ? -1 : 0);
    });

    pairs = pairs.map(function(pair) {
    return [
    //'git checkout ' + parts[0] + '-npm-packages && git commit --amend --no-edit --date "`date`"'//,
    'git tag -f -a -m ' + pair[0] + '-' + branch + ' "' + pair[0] + '-' + branch + '" ' + pair[1]
    ];
    });

    _.eachRight(commands, function(command) {
    console.log(command);
    _.each(pairs, function(pair) {
    pair.forEach(function(command) {
    console.log(command)
    execSync(command);
    });
    });
  25. jdalton revised this gist May 17, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions docdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.8.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.8.0</span>" hash="github"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.9.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.9.0</span>" hash="github"

    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.8.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.8.0</span>" hash="default"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.9.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.9.0</span>" hash="default"
  26. jdalton revised this gist May 1, 2015. 3 changed files with 5 additions and 7 deletions.
    4 changes: 2 additions & 2 deletions docdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.7.0</span>" hash="github"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.8.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.8.0</span>" hash="github"

    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.7.0</span>" hash="default"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.8.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.8.0</span>" hash="default"
    2 changes: 1 addition & 1 deletion npm.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../lodash-cli/bin/lodash modularize modern exports=node -o ./ && node ../lodash-cli/bin/lodash modern -d -o ./index.js

    node ../lodash-cli/bin/lodash modularize compat exports=node -o ./ && node ../lodash-cli/bin/lodash compat -d -o ./index.js
    node ../lodash-cli/bin/lodash modularize compat exports=node -o ./ && node ../lodash-cli/bin/lodash compat -d -o ./index.js
    6 changes: 2 additions & 4 deletions org.js
    Original file line number Diff line number Diff line change
    @@ -12,11 +12,9 @@ var _ = require('lodash-compat'),
    var cwd = process.cwd();

    var packages = _.transform(glob.sync(path.join(cwd, 'lodash.*')), function(result, pathname) {
    var pkgPath = path.join(pathname, 'package.json'),
    stat = fs.statSync(pkgPath);

    var stat = fs.statSync(path.join(pathname, 'index.js'));
    if (!moment(stat.mtime).isSame(stat.birthtime)) {
    result[path.basename(pathname)] = require(pkgPath);
    result[path.basename(pathname)] = require(path.join(pathname, 'package.json'));
    }
    }, {});

  27. jdalton revised this gist Apr 22, 2015. 3 changed files with 67 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions docdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.6.0</span>" hash="github"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.7.0</span>" hash="github"

    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.6.0</span>" hash="default"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.7.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.7.0</span>" hash="default"
    42 changes: 42 additions & 0 deletions org.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,42 @@
    'use strict';

    var util = require('./lib/util.js'),
    fs = util.fs,
    path = util.path;

    var _ = require('lodash-compat'),
    glob = require('glob'),
    moment = require('moment'),
    ncp = require('ncp').ncp;

    var cwd = process.cwd();

    var packages = _.transform(glob.sync(path.join(cwd, 'lodash.*')), function(result, pathname) {
    var pkgPath = path.join(pathname, 'package.json'),
    stat = fs.statSync(pkgPath);

    if (!moment(stat.mtime).isSame(stat.birthtime)) {
    result[path.basename(pathname)] = require(pkgPath);
    }
    }, {});

    var grouped = _.groupBy(packages, 'version');

    _.forOwn(grouped, function(packages, version) {
    var pathname = path.join(cwd, version);
    if (!fs.existsSync(pathname)) {
    fs.mkdirpSync(pathname);
    }
    _.each(packages, function(pkg) {
    var source = path.join(cwd, pkg.name),
    destination = path.join(pathname, pkg.name);

    ncp(source, destination, function (err) {
    if (err) {
    console.error(err);
    return;
    }
    // console.log('copied ' + pkg.name + ' to ' + path.join(version, pkg.name));
    });
    });
    });
    23 changes: 23 additions & 0 deletions tag.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    'use strict';

    var _ = require('lodash-compat'),
    childProcess = require('child_process'),
    execSync = childProcess.execSync,
    spawn = childProcess.spawn;

    var reString = /(["'])(?:(?!\1)[^\n\\]|\\.)*?\1/g;

    var git = spawn('git', ['log', 'npm-packages', '--pretty=format:"%s | %h"']);

    git.stdout.on('data', function(data) {
    var commands = _.map(data.toString().match(reString), function(value) {
    var parts = _.map(_.trim(value, '"\'').split('|'), _.trim);
    parts[0] = _.result(/\d+(?:\.\d+)*/.exec(parts[0]), 0, '');
    return 'git tag -f -a -m ' + parts[0] + '-npm-packages "' + parts[0] + '-npm-packages" ' + parts[1];
    });

    _.eachRight(commands, function(command) {
    console.log(command);
    execSync(command);
    });
    });
  28. jdalton revised this gist Mar 24, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions docdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.5.0</span>" hash="github"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.6.0</span>" hash="github"

    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.5.0</span>" hash="default"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.6.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.6.0</span>" hash="default"
  29. jdalton revised this gist Mar 24, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions docdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.4.0</span>" hash="github"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.5.0</span>" hash="github"

    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.4.0</span>" hash="default"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.5.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.5.0</span>" hash="default"
  30. jdalton revised this gist Mar 1, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions docdown
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.3.1/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.3.1</span>" hash="github"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.4.0</span>" hash="github"

    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.3.1/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.3.1</span>" hash="default"
    node ../docdown/bin/docdown ./lodash.src.js ./doc/README.md toc="categories" url="https://github.com/lodash/lodash/blob/3.4.0/lodash.src.js" title="<a href=\"https://lodash.com/\">lodash</a> <span>v3.4.0</span>" hash="default"