Skip to content

Commit

Permalink
Move scripts to npm scope
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd committed Dec 6, 2017
1 parent fd0b17e commit 64796af
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 59 deletions.
1 change: 0 additions & 1 deletion .ci-env.sh

This file was deleted.

3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

11 changes: 3 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
sudo: false

language:
- php
- node_js
language: php

php:
- 5.4
Expand All @@ -15,9 +11,8 @@ env:
- WP_VERSION=trunk WP_MULTISITE=1

before_script:
- export DEV_LIB_PATH=dev-lib
- if [ ! -e "$DEV_LIB_PATH" ] && [ -L .travis.yml ]; then export DEV_LIB_PATH=$( dirname $( readlink .travis.yml ) ); fi
- if [ ! -e "$DEV_LIB_PATH" ]; then git clone https://github.com/xwp/wp-dev-lib.git $DEV_LIB_PATH; fi
- npm install
- export DEV_LIB_PATH=node_modules/wp-dev-lib
- source $DEV_LIB_PATH/travis.install.sh

script:
Expand Down
36 changes: 0 additions & 36 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,50 +18,14 @@ module.exports = function( grunt ) {
]
},

// VVV (Varying Vagrant Vagrants) Paths
vvv: {
'plugin': '/srv/www/wordpress-develop/src/wp-content/plugins/<%= pkg.name %>',
'coverage': '/srv/www/default/coverage/<%= pkg.name %>'
},

// Shell actions
shell: {
options: {
stdout: true,
stderr: true
},
readme: {
command: 'cd ./dev-lib && ./generate-markdown-readme' // Genrate the readme.md
},
phpunit: {
command: 'vagrant ssh -c "cd <%= vvv.plugin %> && phpunit"'
},
phpunit_c: {
command: 'vagrant ssh -c "cd <%= vvv.plugin %> && phpunit --coverage-html <%= vvv.coverage %>"'
}
}

} );

// Load tasks
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-shell' );

// Register tasks
grunt.registerTask( 'default', [
'jshint'
] );

grunt.registerTask( 'readme', [
'shell:readme'
] );

grunt.registerTask( 'phpunit', [
'shell:phpunit'
] );

grunt.registerTask( 'phpunit_c', [
'shell:phpunit_c'
] );

};
5 changes: 0 additions & 5 deletions composer.json

This file was deleted.

1 change: 0 additions & 1 deletion dev-lib
Submodule dev-lib deleted from bb1ae0
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
"name": "two-factor",
"title": "Two Factor",
"homepage": "https://github.com/georgestephanis/two-factor",
"scripts": {
"grunt": "grunt",
"test": "DIFF_BASE=master ./node_modules/wp-dev-lib/pre-commit",
"readme": "./node_modules/wp-dev-lib/generate-markdown-readme",
"phpunit": "DEV_LIB_ONLY=phpunit ./node_modules/wp-dev-lib/pre-commit",
"precommit": "DEV_LIB_SKIP=phpunit ./node_modules/wp-dev-lib/pre-commit"
},
"repository": {
"type": "git",
"url": "https://github.com/georgestephanis/two-factor.git"
Expand All @@ -11,6 +18,7 @@
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-jshint": "~0.11.3",
"grunt-shell": "~1.1.2"
"husky": "^0.14.3",
"wp-dev-lib": "github:xwp/wp-dev-lib"
}
}
6 changes: 2 additions & 4 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<phpunit
bootstrap="dev-lib/phpunit-plugin-bootstrap.php"
bootstrap="nodes_modules/wp-dev-lib/phpunit-plugin-bootstrap.php"
backupGlobals="false"
colors="true"
convertErrorsToExceptions="true"
Expand All @@ -12,8 +12,6 @@
<testsuites>
<testsuite>
<directory suffix=".php">tests</directory>
<exclude>tests/providers/class.two-factor-fido-u2f.php</exclude>
<file phpVersion="5.3.0" phpVersionOperator=">=">tests/providers/class.two-factor-fido-u2f.php</file>
</testsuite>
</testsuites>
<filter>
Expand All @@ -26,4 +24,4 @@
</exclude>
</whitelist>
</filter>
</phpunit>
</phpunit>

0 comments on commit 64796af

Please sign in to comment.