Comments (2)
Quick update:
@daveromsey and I were able to get the initial setup and integration with Github done. Up next, adding phpcs.xml
and any other tests to verify that Yeoman can stand up the plugin generator.
from generator-plugin-wp.
Quick update:
I have been looking into the PHPCS assertions to run against this repository.
Linting the source code
phpcs
command breaks as soon as it detects any syntax errors in the code. The template files in the repository do contain some syntax errors due to some generator placeholders.
I have tried using phpcs:ignore
at this line but it does not work.
Generating plugin and linting the code
After this, I tried to generate a temporary sample plugin with yo generator on the Buddy docker container.
- Installed Node.js in the container.
- Installed
yo
generator npm package. - Tried generating the plugin using
generator-plugin-wp
as the generator and got the following errors:
/usr/lib/node_modules/yo/node_modules/conf/index.js:128
throw err;
^
Error: EACCES: permission denied, open '/root/.config/insight-nodejs/insight-yo.json'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Conf.get store [as store] (/usr/lib/node_modules/yo/node_modules/conf/index.js:108:18)
at Conf.get (/usr/lib/node_modules/yo/node_modules/conf/index.js:47:27)
at Insight.get optOut [as optOut] (/usr/lib/node_modules/yo/node_modules/insight/lib/index.js:52:22)
at Object.<anonymous> (/usr/lib/node_modules/yo/lib/cli.js:205:48)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14) {
errno: -13,
syscall: 'open',
code: 'EACCES',
path: '/root/.config/insight-nodejs/insight-yo.json'
}
To resolve these errors, I tried running the chmod
command to give permissions to the file mentioned in the error. But this error does not go away even after running the permissions command.
I am stuck on this step until I figure out how to move past this error.
Update
I switched back to ignoring errors in phpcs and found out that we can ignore PHP syntax errors like this: squizlabs/PHP_CodeSniffer#1874 (comment)
I have added the phpcs.xml
file for the repository and will be sending the PR shortly.
from generator-plugin-wp.
Related Issues (20)
- Remove self::/static calls in Widget Template HOT 3
- getLatestWPVersion is not retrieving latest version. HOT 2
- Make css / js optional HOT 2
- input request from install-wp-tests.sh hangs dockunit HOT 2
- Options pages not working HOT 3
- Possible issue with CPT test template HOT 2
- README.md template assumes GPL license HOT 1
- Add Babel and other modernizations HOT 1
- Grunt? Gulp? HOT 1
- Error: Cannot find module 'babel-core'
- Lowercase characters removed in class prefix? HOT 1
- Extra Single Quote on CPT Test Pages HOT 2
- Output should be WDS Coding Standards compliant HOT 3
- Use NPM Scripts and/or Webpack HOT 1
- ReferenceError: primordials is not defined HOT 9
- Installs CMB2 from webdevstudios/cmb2 instead of cmb2/cmb2 HOT 2
- Next Release (0.3.0 maybe?)
- Primordials is not defined HOT 5
- How to use?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator-plugin-wp.