From 160cf33bdbf331775ae2ccce8f374ec9e0988048 Mon Sep 17 00:00:00 2001 From: Francis Gulotta Date: Sat, 15 Sep 2018 03:49:48 -0400 Subject: [PATCH] chore: cleanup - move upgrade guide for serialport package - tweak generators --- .generators/LICENSE | 2 +- .generators/{ => lib}/{{dashCase name}}.js | 0 .generators/{ => lib}/{{dashCase name}}.test.js | 0 .generators/package.json | 2 +- packages/serialport/.npmignore | 6 +++--- UPGRADE_GUIDE.md => packages/serialport/UPGRADE_GUIDE.md | 9 +++++++++ plopfile.js | 5 ++++- 7 files changed, 18 insertions(+), 6 deletions(-) rename .generators/{ => lib}/{{dashCase name}}.js (100%) rename .generators/{ => lib}/{{dashCase name}}.test.js (100%) rename UPGRADE_GUIDE.md => packages/serialport/UPGRADE_GUIDE.md (91%) diff --git a/.generators/LICENSE b/.generators/LICENSE index 9bd2a0c..c132e52 100644 --- a/.generators/LICENSE +++ b/.generators/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright 2018 Francis Gulotta. All rights reserved. +Copyright {{year}} Francis Gulotta. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to diff --git a/.generators/{{dashCase name}}.js b/.generators/lib/{{dashCase name}}.js similarity index 100% rename from .generators/{{dashCase name}}.js rename to .generators/lib/{{dashCase name}}.js diff --git a/.generators/{{dashCase name}}.test.js b/.generators/lib/{{dashCase name}}.test.js similarity index 100% rename from .generators/{{dashCase name}}.test.js rename to .generators/lib/{{dashCase name}}.test.js diff --git a/.generators/package.json b/.generators/package.json index 7847dc3..bd8f0aa 100644 --- a/.generators/package.json +++ b/.generators/package.json @@ -1,7 +1,7 @@ { "name": "@serialport/{{dashCase name}}", "version": "1.0.0", - "main": "{{dashCase name}}.js", + "main": "lib/{{dashCase name}}.js", "dependencies": { "debug": "^3.1.0" }, diff --git a/packages/serialport/.npmignore b/packages/serialport/.npmignore index e4481c2..8d2687f 100644 --- a/packages/serialport/.npmignore +++ b/packages/serialport/.npmignore @@ -1,10 +1,10 @@ +*.test.js +CHANGELOG.md examples/ node_modules -package-lock.json test-arduino test-config.json test-electron test-manual test/ -*.test.js -CHANGELOG.md +UPGRADE_GUIDE.md diff --git a/UPGRADE_GUIDE.md b/packages/serialport/UPGRADE_GUIDE.md similarity index 91% rename from UPGRADE_GUIDE.md rename to packages/serialport/UPGRADE_GUIDE.md index 01c988b..b701588 100644 --- a/UPGRADE_GUIDE.md +++ b/packages/serialport/UPGRADE_GUIDE.md @@ -1,3 +1,12 @@ +Upgrading from 7.x to 8.x +------------- +- Serialport cli tools are now their own packages. See https://serialport.io/docs/guide-cli for more information on how to use them. + + +Upgrading from 6.x to 7.x +------------- +We dropped support for Node.js 4, so you'll have to upgrade if you're running 4. We also split into many packages. See https://serialport.io/docs/api-overview for an overview of the new packages. Binaries have moved into `@serialport/bindings` so if you're distributing serialport in an electron app, you may have to make some changes. + Upgrading from 5.x to 6.x ------------- TLDR: You probably don't have to change anything. You might need to enable `rtscts` in your open options. diff --git a/plopfile.js b/plopfile.js index a45f049..f47f0b3 100644 --- a/plopfile.js +++ b/plopfile.js @@ -16,7 +16,10 @@ module.exports = function(plop) { { type: 'addMany', destination: 'packages/{{dashCase name}}/', - templateFiles: '.generators/*', + templateFiles: '.generators/**/*', + data: { + year: new Date().getFullYear(), + }, }, ], })