Skip to content

Commit

Permalink
feat: added license text support
Browse files Browse the repository at this point in the history
The tool now has the ability to add a license header to all code files. This header can be
overwritten by any project. A new nps command, license, along with license.remove had been added to
manage the liecense text in the files. The Husky pre-commit hook now adds the license information to
every file upon commit.

webLibrary has been removed, as it was not used. webLibrary project should be converted to
reactLibrary projects, by wrapping the simple web element into a react one.

BREAKING CHANGE: Uppon commit, every file will end up with a license header
  • Loading branch information
alanrodas committed Apr 5, 2024
1 parent 651fca5 commit 3c6d238
Show file tree
Hide file tree
Showing 665 changed files with 2,702 additions and 50,307 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ npx --no -- nps prettify;
echo "\nRun changelog\n";
npx --no -- nps changelog;

# Run license
echo "\nAdd license text to code files\n";
npx --no -- nps license;

# Add all generated files
echo "\nAdd generated files to commit\n";
git add --all;
Expand Down
31 changes: 28 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@
## [0.7.2](https://github.com/gobstones/gobstones-scripts/compare/v0.7.1...v0.7.2) (2024-02-02)
# [0.8.0](https://github.com/gobstones/gobstones-scripts/compare/v0.7.2...v0.8.0) (2024-04-05)


### Bug Fixes
### Features

* **nocode:** noCode projects had a problem when trying to run certain tasks ([220160e](https://github.com/gobstones/gobstones-scripts/commit/220160e780b3bc07c3bad8f9bb8eed1369102e15))
* added license text support ([022f5c1](https://github.com/gobstones/gobstones-scripts/commit/022f5c1763d88a7345bdeb8b964238485d5b9f39))


### BREAKING CHANGES

* Uppon commit, every file will end up with a license header



# [0.8.0](https://github.com/gobstones/gobstones-scripts/compare/v0.7.2...v0.8.0) (2024-04-03)

### Features

- added license text support ([62c887a](https://github.com/gobstones/gobstones-scripts/commit/62c887a1daba2c4c6efb767e02b4aa1b69bf393e))

### BREAKING CHANGES

- Uppon commit, every file will end up with a license header

# [0.8.0](https://github.com/gobstones/gobstones-scripts/compare/v0.7.2...v0.8.0) (2024-04-03)

# [0.8.0](https://github.com/gobstones/gobstones-scripts/compare/v0.7.2...v0.8.0) (2024-04-03)

## [0.7.2](https://github.com/gobstones/gobstones-scripts/compare/v0.7.1...v0.7.2) (2024-02-02)

### Bug Fixes

- **nocode:** noCode projects had a problem when trying to run certain tasks ([220160e](https://github.com/gobstones/gobstones-scripts/commit/220160e780b3bc07c3bad8f9bb8eed1369102e15))

## [0.7.2](https://github.com/gobstones/gobstones-scripts/compare/v0.7.1...v0.7.2) (2024-02-02)

Expand Down
29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# GOBSTONES LICENSE

Copyright (C) National University of Quilmes 2018-2024
Gobstones (TM) is a trademark of the National University of Quilmes.

This program is free software distributed under the terms of the
GNU Affero General Public License version 3 solely. Additional terms added in compliance to section 7 of such license apply.

Additional terms are listed next. Below them you may find a full copy
of the GNU Affero General Public License version 3.


# ADDITIONAL TERMS

This program is free software. You may redistribute it and/or modify it solely under the terms of the GNU Affero General Public License (AGPL) version 3 published by the Free Software Foundation available at http://www.gnu.org/licenses/agpl-3.0.html and under the conditions detailed here.

This program is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Any copy of the program that you propagate should include the "Non-Certified Software and/or Service" notice clearly visible in the user interface and can not use the Gobstones name, logo, brand and/or denomination, as long as your copies of the program remain uncertified. Any copy of the program that you convey should also present the "Non-Certified Software and/or Service" notice and is prohibited to use of the Gobstones name, logo, brand and/or denomination, even if your copy is certified.

To certify your copies of the software you may contact the National University of Quilmes by email at [email protected] or by postal mail at the Rectorate of the National University of Quilmes, Roque Sáenz Peña 352, Bernal, Buenos Aires, Argentina (B1876BXD).

Gobstones is a trademark of the National University of Quilmes. Is explicitly prohibited any use of the Gobstones brand, name, logo, and/or denomination and of any other brand of the National University of Quilmes without the explicit permission and authorization granted by the university in written form.

The use of the name of the National University of Quilmes and/or of the authors of the covered work or associated materials to either promote, advertise and/or sell non certified copies of the software is explicitly prohibited.

Interactive user interfaces in modified source and object code versions of Gobstones, whether text or graphical, must display appropriate legal notices with reference to the GNU Affero Public License version 3 and to this Additional Terms. You may find a full copy of the license with the additional terms at [https://gobstones.github.org/gobstones-guidelines/LICENSE](https://gobstones.github.org/gobstones-guidelines/LICENSE).


# GNU AFFERO GENERAL PUBLIC LICENSE

Version 3, 19 November 2007
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ The underlying technologies in use include

- **typescript** (tsc for building)
- **rollup** (for bundling libraries and cli-libraries)
- **vite** (for bundling web-libraries and react-libraries)
- **vite** (for bundling react-libraries)
- **eslint** (for linting)
- **prettier** (for styling)
- **typedoc** (for documentation generation)
Expand Down
24 changes: 20 additions & 4 deletions package-scripts.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const defaultConfiguration = {
module.exports = {
options: {
scripts: false,
logLevel: 'warn',
Expand Down Expand Up @@ -80,7 +80,7 @@ const defaultConfiguration = {
'concurrently --kill-others-on-fail --prefix-colors bgBlue.bold,bgMagenta.bold ' +
'--prefix "[{name}]" --names verdaccio.serve,publish ' +
'"nps verdaccio.serve" ' +
('"rimraf ./test/verdaccio/storage/* ' + '&& npm publish --registry http://localhost:4567"'),
'"rimraf ./test/verdaccio/storage/* && npm publish --registry http://localhost:4567"',
description: 'Run Verdaccio server and publish current version of library to it',
serve: {
script: 'verdaccio --config ./test/verdaccio/config.yml',
Expand All @@ -98,8 +98,24 @@ const defaultConfiguration = {
description: 'Generate changelog based on tags, starting from scratch',
hiddenFromHelp: true
}
},

license: {
script:
'npx tsconfig.js --once --root=./project-types/common/license.config.js --add-comments=none ' +
'&& license-check-and-add add -f ./project-types/common/license.config.json ' +
'&& npx rimraf ./project-types/common/license.config.json',
hiddenFromHelp: true,
description: 'Add license information to all code files in the project',
remove: {
script:
'npx tsconfig.js --once --root=./project-types/common/license.config.js --add-comments=none ' +
'&& license-check-and-add remove -f ./project-types/common/license.config.json ' +
'&& npx rimraf ./project-types/common/license.config.json',

hiddenFromHelp: true,
description: 'Add license information to all code files in the project'
}
}
}
};

module.exports = defaultConfiguration;
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gobstones/gobstones-scripts",
"version": "0.7.2",
"version": "0.8.0",
"description": "Scripts to abstract away build configuration of Gobstones Project's libraries and modules.",
"repository": {
"type": "git",
Expand Down Expand Up @@ -108,6 +108,7 @@
"is-ci": "^3.0.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"license-check-and-add": "^4.0.5",
"nps": "^5.10.0",
"postcss": "^8.4.31",
"prettier": "^3.0.3",
Expand All @@ -128,6 +129,5 @@
"typedoc-plugin-remove-references": "^0.0.6",
"typescript": "^5.2.2",
"vite": "^4.5.0"
},
"devDependencies": {}
}
}
2 changes: 1 addition & 1 deletion project-types/cliLibrary/package-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"commander": "^11.1.0"
},
"devDependencies": {
"@gobstones/gobstones-scripts": "^0.7.2",
"@gobstones/gobstones-scripts": "^0.8.0",
"husky": "^8.0.2"
}
}
11 changes: 11 additions & 0 deletions project-types/cliLibrary/package-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,17 @@ const defaultConfiguration = {
description: 'Generate changelog based on tags, starting from scratch',
hiddenFromHelp: true
}
},

license: {
script: tasks.license(),
hiddenFromHelp: true,
description: 'Add license information to all code files in the project',
remove: {
script: tasks.license('remove'),
hiddenFromHelp: true,
description: 'Add license information to all code files in the project'
}
}
}
};
Expand Down
3 changes: 1 addition & 2 deletions project-types/cliLibrary/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const fs = require('fs');
const path = require('path');

const { config } = require('@gobstones/gobstones-scripts');
const commonjs = require('@rollup/plugin-commonjs');
Expand Down Expand Up @@ -31,7 +30,7 @@ module.exports = [
plugins: [
typescript({
tsconfig: `${tsConfigPath}`,
declarationDir: path.join(path.dirname(packageJson.exports['.'].import.default), './typings')
declarationDir: './typings'
}),
commonjs()
],
Expand Down
22 changes: 22 additions & 0 deletions project-types/cliLibrary/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* *****************************************************************************
* Copyright (C) National University of Quilmes 2018-2024
* Gobstones (TM) is a trademark of the National University of Quilmes.
*
* This program is free software distributed under the terms of the
* GNU Affero General Public License version 3. Additional terms added in compliance to section 7 of such license apply.
*
* You may read the full license at https://gobstones.github.org/gobstones-guidelines/LICENSE.
* *****************************************************************************
*/
/*
* *****************************************************************************
* Copyright (C) National University of Quilmes 2012-2024
* Gobstones (TM) is a registered trademark of the National University of Quilmes.
*
* This program is free software distributed under the terms of the
* GNU Affero General Public License version 3. Additional terms added in compliance to section 7 of such license apply.
*
* You may read the full license at https://gobstones.github.org/gobstones-guidelines/LICENSE.
* *****************************************************************************
*/
/**
* This is the file that contains the CLI program.
* One built, you may run this file from the command line.
Expand Down
22 changes: 22 additions & 0 deletions project-types/cliLibrary/src/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* *****************************************************************************
* Copyright (C) National University of Quilmes 2018-2024
* Gobstones (TM) is a trademark of the National University of Quilmes.
*
* This program is free software distributed under the terms of the
* GNU Affero General Public License version 3. Additional terms added in compliance to section 7 of such license apply.
*
* You may read the full license at https://gobstones.github.org/gobstones-guidelines/LICENSE.
* *****************************************************************************
*/
/*
* *****************************************************************************
* Copyright (C) National University of Quilmes 2012-2024
* Gobstones (TM) is a registered trademark of the National University of Quilmes.
*
* This program is free software distributed under the terms of the
* GNU Affero General Public License version 3. Additional terms added in compliance to section 7 of such license apply.
*
* You may read the full license at https://gobstones.github.org/gobstones-guidelines/LICENSE.
* *****************************************************************************
*/
/**
* The documentation for this module, that is, the module that
* contains all helpers.
Expand Down
22 changes: 22 additions & 0 deletions project-types/cliLibrary/src/helpers/stringJoiner.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* *****************************************************************************
* Copyright (C) National University of Quilmes 2018-2024
* Gobstones (TM) is a trademark of the National University of Quilmes.
*
* This program is free software distributed under the terms of the
* GNU Affero General Public License version 3. Additional terms added in compliance to section 7 of such license apply.
*
* You may read the full license at https://gobstones.github.org/gobstones-guidelines/LICENSE.
* *****************************************************************************
*/
/*
* *****************************************************************************
* Copyright (C) National University of Quilmes 2012-2024
* Gobstones (TM) is a registered trademark of the National University of Quilmes.
*
* This program is free software distributed under the terms of the
* GNU Affero General Public License version 3. Additional terms added in compliance to section 7 of such license apply.
*
* You may read the full license at https://gobstones.github.org/gobstones-guidelines/LICENSE.
* *****************************************************************************
*/
/**
* @module API.Helpers
* @author Your Name <[email protected]>
Expand Down
22 changes: 22 additions & 0 deletions project-types/cliLibrary/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* *****************************************************************************
* Copyright (C) National University of Quilmes 2018-2024
* Gobstones (TM) is a trademark of the National University of Quilmes.
*
* This program is free software distributed under the terms of the
* GNU Affero General Public License version 3. Additional terms added in compliance to section 7 of such license apply.
*
* You may read the full license at https://gobstones.github.org/gobstones-guidelines/LICENSE.
* *****************************************************************************
*/
/*
* *****************************************************************************
* Copyright (C) National University of Quilmes 2012-2024
* Gobstones (TM) is a registered trademark of the National University of Quilmes.
*
* This program is free software distributed under the terms of the
* GNU Affero General Public License version 3. Additional terms added in compliance to section 7 of such license apply.
*
* You may read the full license at https://gobstones.github.org/gobstones-guidelines/LICENSE.
* *****************************************************************************
*/
/**
* This file is the one that runs when you perform a
* npm start dev. It just imports some classes and prints
Expand Down
22 changes: 22 additions & 0 deletions project-types/cliLibrary/src/models/MyClass.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* *****************************************************************************
* Copyright (C) National University of Quilmes 2018-2024
* Gobstones (TM) is a trademark of the National University of Quilmes.
*
* This program is free software distributed under the terms of the
* GNU Affero General Public License version 3. Additional terms added in compliance to section 7 of such license apply.
*
* You may read the full license at https://gobstones.github.org/gobstones-guidelines/LICENSE.
* *****************************************************************************
*/
/*
* *****************************************************************************
* Copyright (C) National University of Quilmes 2012-2024
* Gobstones (TM) is a registered trademark of the National University of Quilmes.
*
* This program is free software distributed under the terms of the
* GNU Affero General Public License version 3. Additional terms added in compliance to section 7 of such license apply.
*
* You may read the full license at https://gobstones.github.org/gobstones-guidelines/LICENSE.
* *****************************************************************************
*/
/**
* @module API.Models
* @author Your Name <[email protected]>
Expand Down
22 changes: 22 additions & 0 deletions project-types/cliLibrary/src/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* *****************************************************************************
* Copyright (C) National University of Quilmes 2018-2024
* Gobstones (TM) is a trademark of the National University of Quilmes.
*
* This program is free software distributed under the terms of the
* GNU Affero General Public License version 3. Additional terms added in compliance to section 7 of such license apply.
*
* You may read the full license at https://gobstones.github.org/gobstones-guidelines/LICENSE.
* *****************************************************************************
*/
/*
* *****************************************************************************
* Copyright (C) National University of Quilmes 2012-2024
* Gobstones (TM) is a registered trademark of the National University of Quilmes.
*
* This program is free software distributed under the terms of the
* GNU Affero General Public License version 3. Additional terms added in compliance to section 7 of such license apply.
*
* You may read the full license at https://gobstones.github.org/gobstones-guidelines/LICENSE.
* *****************************************************************************
*/
/**
* The documentation for this module, that is, the module that
* contains all models.
Expand Down
22 changes: 22 additions & 0 deletions project-types/cliLibrary/src/translations/Locale.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* *****************************************************************************
* Copyright (C) National University of Quilmes 2018-2024
* Gobstones (TM) is a trademark of the National University of Quilmes.
*
* This program is free software distributed under the terms of the
* GNU Affero General Public License version 3. Additional terms added in compliance to section 7 of such license apply.
*
* You may read the full license at https://gobstones.github.org/gobstones-guidelines/LICENSE.
* *****************************************************************************
*/
/*
* *****************************************************************************
* Copyright (C) National University of Quilmes 2012-2024
* Gobstones (TM) is a registered trademark of the National University of Quilmes.
*
* This program is free software distributed under the terms of the
* GNU Affero General Public License version 3. Additional terms added in compliance to section 7 of such license apply.
*
* You may read the full license at https://gobstones.github.org/gobstones-guidelines/LICENSE.
* *****************************************************************************
*/
/**
* This module defines an internal locale definition that any translation
* should comply to. Change this file according to your needs.
Expand Down
Loading

0 comments on commit 3c6d238

Please sign in to comment.