{"id":18781585,"url":"https://github.com/aboutlo/plain-js-app-skeleton","last_synced_at":"2025-07-15T17:36:07.924Z","repository":{"id":20039004,"uuid":"23307183","full_name":"aboutlo/plain-js-app-skeleton","owner":"aboutlo","description":"A proper way to create a plain javascript project using modern tools","archived":false,"fork":false,"pushed_at":"2017-06-13T04:06:13.000Z","size":164,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-28T07:47:46.631Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aboutlo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-25T08:34:13.000Z","updated_at":"2014-08-25T09:13:34.000Z","dependencies_parsed_at":"2022-09-22T22:01:22.226Z","dependency_job_id":null,"html_url":"https://github.com/aboutlo/plain-js-app-skeleton","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aboutlo/plain-js-app-skeleton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutlo%2Fplain-js-app-skeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutlo%2Fplain-js-app-skeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutlo%2Fplain-js-app-skeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutlo%2Fplain-js-app-skeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aboutlo","download_url":"https://codeload.github.com/aboutlo/plain-js-app-skeleton/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboutlo%2Fplain-js-app-skeleton/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265450555,"owners_count":23767643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T20:32:43.985Z","updated_at":"2025-07-15T17:36:07.882Z","avatar_url":"https://github.com/aboutlo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\nFind a proper way to create a plain javascript project using modern tool hasn't been so easy. \nSo I created this boilerplate project with the aim of provide a basic template with:\n \n- directory layout\n- a couple of classes\n- a testing env properly configured with mocha, chai, and sinonjs running on phantomjs as well your browser\n\n# requirements\n\nSystem\n\n- Homebrew *Package Manager. Allows to install, remove and updated applications and packages.* \u003chttp://brew.sh\u003e\n- Phantomjs *a headless WebKit scriptable with a JavaScript API.* \n\nApp\n\n- NPM *Node Packaged Modules* \u003chttps://www.npmjs.org/\u003e\n- Bower *A package manager for the web* \u003chttp://bower.io\u003e\n- Gulp *The streaming build system* \u003chttp://gulpjs.com\u003e\n\nTest\n\n- Mocha *javaScript test framework running on node.js and the browser* \u003chttp://visionmedia.github.io/mocha/\u003e\n- Chai  *a BDD / TDD assertion library* \u003chttp://chaijs.com/\u003e\n- Sinon *standalone test spies, stubs and mocks for JavaScript* \u003chttp://http://sinonjs.org/\u003e\n- Sinon-chai *custom assertions for using Sinon with the Chai assertion library* \u003chttps://github.com/domenic/sinon-chai\u003e\n\n# getting started\n\nJust clone this repo where ever you need. \n\n```\ngit clone git@github.com:aboutlo/plain-js-app-skeleton.git YOUR_APPLICATION_NAME\n```\n\nThen you have to get all the dependencies via npm\n\n```\n$ cd plain-js-app-skeleton\n$ npm install\n\n```\n\nReplace all plain-js-app-skeleton with YOUR_APPLICATION_NAME\n\n```\n$ sed -i '' 's/plain-js-app-skeleton/your_application_name/g' *.json\n$ sed -i '' 's/plain-js-app-skeleton/your_application_name/g' test/bower.json \n```\n\nThen you can require all test js dependencies. Notice: There isn't js lib required to the project. \n\n```\n$ cd test\n$ bower install \n```\n\n\nSo now you are ready to run the app. \n \n```\n$ gulp serve\n```\n\nBefore running the test you have to install JS dependencies via bower\n\n```\n$ cd test\n$ bower install\n```\n\nNow you can run tests via command line using mocha and phantomjs:\n\n```\n$ gulp test\n```\n\nor directly on your browser\n\n```\n$ open spec/index.html\n```\n\nnotice: I'm using mocha with chai.js. You can use assert, expect and should style out of the box. \n\nTo build the application just execute\n\n```\n$ gulp build\n```\n\nA dist directory with all minified objects will be created. Deploy it where ever you need.\n\n# How to add classes or tests\n\nIt's pretty simple. Just add the classes in *app/scripts* (one for file) and tests in *test/spec*\nThen you have to add them to *app/index.html* and test/index.html. Pay attention, order them with the proper priority.\n  \nex. test/index/html\n\n```\n  \u003c!-- include source files here... --\u003e\n  \u003cscript src=\"../app/scripts/namepace.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"../app/scripts/utils.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"../app/scripts/my_app.js\"\u003e\u003c/script\u003e\n\n  \u003c!-- include spec files here... --\u003e\n  \u003cscript src=\"spec/my_app_spec.js\"\u003e\u003c/script\u003e\n```\n\nWe added *sinonjs* and *sinon-chai* to spy, stup and mock your classes using mocha and expect style. \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faboutlo%2Fplain-js-app-skeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faboutlo%2Fplain-js-app-skeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faboutlo%2Fplain-js-app-skeleton/lists"}