From f0945fbb8be44a087963122e52fd0f809ed200a9 Mon Sep 17 00:00:00 2001 From: Julien Enoch Date: Thu, 18 Mar 2021 15:00:02 +0100 Subject: [PATCH] Add copyright header and set 'browser' in package.json --- README.md | 6 ++++++ package-lock.json | 4 ++-- package.json | 3 ++- src/cdrreader.js | 10 ++++++++++ src/cdrwriter.js | 10 ++++++++++ src/index.js | 10 ++++++++++ webpack.config.babel.js | 10 ++++++++++ 7 files changed, 50 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d9acfca..51b0f07 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/jscdr/badge)](https://www.jsdelivr.com/package/npm/jscdr) [![License](https://img.shields.io/badge/License-EPL%202.0-blue)](https://choosealicense.com/licenses/epl-2.0/) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) @@ -15,6 +16,11 @@ It doesn't include an IDL compiler generating Javascript encoder/decoder for com ## Usage +Add the following to your HTML page: +```html + +``` + Assuming a DDS type is defined with the following IDL: ```c module HelloWorldData diff --git a/package-lock.json b/package-lock.json index 17adb9f..7d294cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "jscdr", - "version": "0.0.1-beta.2", + "version": "0.0.1-beta.3", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "0.0.1-beta.2", + "version": "0.0.1-beta.3", "license": "EPL-2.0 OR Apache-2.0", "dependencies": { "bytebuffer": "5.0.1", diff --git a/package.json b/package.json index 2774a13..3df4d27 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,9 @@ { "name": "jscdr", - "version": "0.0.1-beta.2", + "version": "0.0.1-beta.3", "description": "A DDS-CDR encoder/decoder library.", "main": "dist/index.js", + "browser": "dist/index.umd.min.js", "scripts": { "prebuild": "rimraf dist", "build": "npm-run-all --parallel build:*", diff --git a/src/cdrreader.js b/src/cdrreader.js index 0f64981..f242617 100644 --- a/src/cdrreader.js +++ b/src/cdrreader.js @@ -1,3 +1,13 @@ +// +// Copyright (c) 2021 ADLINK Technology Inc. +// +// This program and the accompanying materials are made available under the +// terms of the Eclipse Public License 2.0 which is available at +// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 +// which is available at https://www.apache.org/licenses/LICENSE-2.0. +// +// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +// import ByteBuffer from 'bytebuffer'; export class CDRReader { diff --git a/src/cdrwriter.js b/src/cdrwriter.js index bb4444c..4acaec1 100644 --- a/src/cdrwriter.js +++ b/src/cdrwriter.js @@ -1,3 +1,13 @@ +// +// Copyright (c) 2021 ADLINK Technology Inc. +// +// This program and the accompanying materials are made available under the +// terms of the Eclipse Public License 2.0 which is available at +// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 +// which is available at https://www.apache.org/licenses/LICENSE-2.0. +// +// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +// import ByteBuffer from 'bytebuffer'; export class CDRWriter { diff --git a/src/index.js b/src/index.js index fdbab87..c422ae7 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,13 @@ +// +// Copyright (c) 2021 ADLINK Technology Inc. +// +// This program and the accompanying materials are made available under the +// terms of the Eclipse Public License 2.0 which is available at +// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 +// which is available at https://www.apache.org/licenses/LICENSE-2.0. +// +// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +// import "core-js/stable"; import "regenerator-runtime/runtime"; diff --git a/webpack.config.babel.js b/webpack.config.babel.js index 814dadd..3e13068 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -1,3 +1,13 @@ +// +// Copyright (c) 2021 ADLINK Technology Inc. +// +// This program and the accompanying materials are made available under the +// terms of the Eclipse Public License 2.0 which is available at +// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 +// which is available at https://www.apache.org/licenses/LICENSE-2.0. +// +// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +// const path = require('path'); module.exports = {