Closed swashata closed 6 years ago
@micc83 refactoring the code has been mainly done. I will see how much more I can modularize the plugin code and also fix all eslint errors.
Take a look if you get a chance. The setup process is
npm install
npm run serve
This will open up the demo with browsersync. All files are now inside src
and build files are ignored. It is created with gulp build
or npm run build
. Files will go inside dist
. While tagging, I have plans to release through npm and upload release artifacts from travis ci.
Hello @swashata, obviously you don't need my approval but I must say you did an amazing job modernizing the environment. Then, I've almost fainted when checked the result of gulp lint
š . I can't believe we used to live without linters! So I guess next step should be resolve all those lint issues and eventually start to test. Also, not sure if we should keep tracking dist files, as twitter bootstrap does (for those who like to live on the edge š ).
Fortunately most of the lint errors are spacing related. š And for the build files, I think it is better if we do not track it. For every tags it will be available on npm and GitHub release (the dist files). I will proceed like this and if we find a good reason for tracking build files we will do it in future.
Sure, from a theoretical point of view I completely agree with you on this. My point was that sometime I found myself needing the latest version (master/dev) of a given package because of an hotfix or else. Having the dist
folder being built at runtime (only on tags/releases) would not allow for that. However, as I told you before I completely thrust your hard work so let's take this way and in case, we'll reconsider.
Very well. Now I will concentrate on fixing lint errors and creating test cases with jest and jsdom.
This issue was moved to fontIconPicker/fontIconPicker#2
The first thing we need to focus on is modernize the environment for development. Currently, the build process is manual and code is intermingled.
Phase 1: Modernize environment
package.json
with devDependenciesgulp
,jest
,babel
,eslint
,stylelint
and needed plugins/config.editorconfig
for consistency with coding.eslint
stylelint
.Phase 2: Modularize code
Plugin
fromjQuery
wrapper and useUMD
within the build process. We can concat.Plugin
class into separate smaller methods so that we can unit test.All built code should go under
./dist
which should be in.gitignore
. All source code will go under./src
which will be under.npmignore
.Phase 3: Setup Testing
.js
and.scss
files.Phase 4: Setup CI
General Testing
Tagged Releases
.zip
.Phase 5: Document procedure
References:
Saving some references which I might need in future.