diff --git a/.gitignore b/.gitignore index 7fb279f..a52416c 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ build # Typescript typings typings -# VS Code settings +# VS Code & IDEA settings .settings -.vscode \ No newline at end of file +.vscode +.idea diff --git a/ant-plus.js b/ant-plus.js deleted file mode 100644 index 3cb8da4..0000000 --- a/ant-plus.js +++ /dev/null @@ -1,33 +0,0 @@ -const Ant = require('./build/ant'); -const HRS = require('./build/heart-rate-sensors'); -const SSD = require('./build/stride-speed-distance-sensors'); -const SC = require('./build/speed-cadence-sensors'); -const S = require('./build/speed-sensors'); -const C = require('./build/cadence-sensors'); -const BP = require('./build/bicycle-power-sensors'); -const FE = require('./build/fitness-equipment-sensors'); -const MO = require('./build/muscle-oxygen-sensors'); -const E = require('./build/environment-sensors'); - -module.exports = { - GarminStick2: Ant.GarminStick2, - GarminStick3: Ant.GarminStick3, - HeartRateSensor: HRS.HeartRateSensor, - HeartRateScanner: HRS.HeartRateScanner, - StrideSpeedDistanceSensor: SSD.StrideSpeedDistanceSensor, - StrideSpeedDistanceScanner: SSD.StrideSpeedDistanceScanner, - SpeedCadenceSensor: SC.SpeedCadenceSensor, - SpeedCadenceScanner: SC.SpeedCadenceScanner, - SpeedSensor: S.SpeedSensor, - SpeedScanner: S.SpeedScanner, - CadenceSensor: C.CadenceSensor, - CadenceScanner: C.CadenceScanner, - BicyclePowerSensor: BP.BicyclePowerSensor, - BicyclePowerScanner: BP.BicyclePowerScanner, - FitnessEquipmentSensor: FE.FitnessEquipmentSensor, - FitnessEquipmentScanner: FE.FitnessEquipmentScanner, - MuscleOxygenSensor: MO.MuscleOxygenSensor, - MuscleOxygenScanner: MO.MuscleOxygenScanner, - EnvironmentSensor: E.EnvironmentSensor, - EnvironmentScanner: E.EnvironmentScanner, -}; diff --git a/ant-plus.ts b/ant-plus.ts new file mode 100644 index 0000000..c6d9272 --- /dev/null +++ b/ant-plus.ts @@ -0,0 +1,11 @@ +export * from './src/ant'; +export * from './src/ant'; +export * from './src/heart-rate-sensors'; +export * from './src/stride-speed-distance-sensors'; +export * from './src/speed-cadence-sensors'; +export * from './src/speed-sensors'; +export * from './src/cadence-sensors'; +export * from './src/bicycle-power-sensors'; +export * from './src/fitness-equipment-sensors'; +export * from './src/muscle-oxygen-sensors'; +export * from './src/environment-sensors'; diff --git a/package.json b/package.json index 4f481ec..557eb67 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "name": "ant-plus", "version": "0.1.25", "description": "A node module for ANT+", - "main": "ant-plus.js", + "main": "build/ant-plus.js", + "typings": "build/ant-plus.d.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "prepare": "tsc" @@ -28,7 +29,7 @@ "@types/usb": "^1.5.1" }, "files": [ - "ant-plus.js", + "ant-plus.ts", "src/", "build/" ],