Skip to content

Commit

Permalink
Merge pull request #145 from neaps/kevee/yarn-to-npm
Browse files Browse the repository at this point in the history
Move from yarn to NPM. Update dependencies
  • Loading branch information
kevee authored Jun 30, 2022
2 parents fc162dc + cb6cfdb commit 6d59924
Show file tree
Hide file tree
Showing 21 changed files with 19,530 additions and 6,142 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v2

- name: Install modules
run: yarn
run: npm install

- name: Test
run: yarn ci
run: npm run ci
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
.local
coverage
junit.xml
.test-cache
.test-cache
.DS_Store
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"semi": false,
"singleQuote": true
"singleQuote": true,
"trailingComma": "none"
}
8 changes: 4 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env node */
/* eslint-disable no-process-env, camelcase */

module.exports = function(grunt) {
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
eslint: {
Expand All @@ -14,7 +14,7 @@ module.exports = function(grunt) {
command: 'BABEL_ENV=build rollup -c'
},
test: {
command: 'yarn run test'
command: 'npm run test'
}
},
uglify: {
Expand All @@ -30,7 +30,7 @@ module.exports = function(grunt) {
expand: true,
src: ['*.js', '!*.min.js'],
dest: 'dist/',
rename: function(dest, src) {
rename: function (dest, src) {
return dest + src.replace(/\.js$/, '.min.js')
}
}
Expand Down Expand Up @@ -75,7 +75,7 @@ module.exports = function(grunt) {
this.registerTask(
'build',
'Builds a distributable version of the current project',
['clean', 'eslint', 'exec:test', 'babel', 'exec:rollup']
['clean', 'eslint', 'exec:test', 'babel', 'exec:rollup', 'uglify']
)
grunt.loadNpmTasks('grunt-eslint')
grunt.loadNpmTasks('grunt-contrib-clean')
Expand Down
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ The tide predictions do not factor events such as storm surge, wind waves, uplif
# Installation

```
#npm
npm install @neaps/tide-prediction
# yarn
yarn install @neaps/tide-prediction
yarn add @neaps/tide-prediction
#npm
npm install --save @neaps/tide-prediction
```

# Usage
Expand All @@ -40,13 +41,13 @@ const constituents = [
phase_local: 313.7,
amplitude: 2.687,
name: 'M2',
speed: 28.984104,
},
speed: 28.984104
}
//....there are usually many, read the docs
]

const highLowTides = tidePrediction(constituents, {
phaseKey: 'phase_GMT',
phaseKey: 'phase_GMT'
}).getExtremesPrediction(new Date('2019-01-01'), new Date('2019-01-10'))
```

Expand Down Expand Up @@ -76,8 +77,8 @@ const tides = tidePrediction(constituents).getExtremesPrediction({
labels: {
//optional human-readable labels
high: 'High tide',
low: 'Low tide',
},
low: 'Low tide'
}
})
```

Expand All @@ -90,13 +91,13 @@ const tides = tidePrediction(constituents).getExtremesPrediction({
offset: {
height_offset: {
high: 1,
low: 2,
low: 2
},
time_offset: {
high: 1,
low: 2,
},
},
low: 2
}
}
})
```

Expand Down Expand Up @@ -128,7 +129,7 @@ Gives you the predicted water level at a specific time.

```javascript
const waterLevel = tidePrediction(constituents).getWaterLevelAtTime({
time: new Date(),
time: new Date()
})
```

Expand Down
Loading

0 comments on commit 6d59924

Please sign in to comment.