{"id":20028623,"url":"https://github.com/phase2/p2-theme-core","last_synced_at":"2025-10-26T15:17:22.828Z","repository":{"id":48620187,"uuid":"45063581","full_name":"phase2/p2-theme-core","owner":"phase2","description":"Core configuration for Pattern Lab Starter/Particle v9","archived":false,"fork":false,"pushed_at":"2021-07-17T13:21:32.000Z","size":1554,"stargazers_count":16,"open_issues_count":8,"forks_count":22,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-18T04:35:41.668Z","etag":null,"topics":["gulp-tasks"],"latest_commit_sha":null,"homepage":"","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/phase2.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-27T19:05:46.000Z","updated_at":"2024-02-19T14:52:46.000Z","dependencies_parsed_at":"2022-09-15T20:50:28.772Z","dependency_job_id":null,"html_url":"https://github.com/phase2/p2-theme-core","commit_stats":null,"previous_names":[],"tags_count":109,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fp2-theme-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fp2-theme-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fp2-theme-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fp2-theme-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phase2","download_url":"https://codeload.github.com/phase2/p2-theme-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252435168,"owners_count":21747356,"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":["gulp-tasks"],"created_at":"2024-11-13T09:15:45.303Z","updated_at":"2025-10-26T15:17:17.770Z","avatar_url":"https://github.com/phase2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Read the Docs Badge](https://readthedocs.org/projects/p2-theme-core/badge/?version=latest)](http://p2-theme-core.readthedocs.org/en/latest/?badge=latest) [![Build Status](https://travis-ci.org/phase2/p2-theme-core.svg?branch=master)](https://travis-ci.org/phase2/p2-theme-core)\n\n[![NPM](https://nodei.co/npm/p2-theme-core.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/p2-theme-core)\n\n[![NPM](https://nodei.co/npm-dl/p2-theme-core.png?months=6)](https://nodei.co/npm/p2-theme-core)\n\n\n# Prerequisites\n\n- p2-theme-core v9: Node \u003e=4.0.0 \u003e=8.0.0\n- p2-theme-core v10: Node \u003e=6.0.0 \u003c=8.0.0\n\n**This is one of two pieces of our themes:**\n\n- [`pattern-lab-starter`](https://github.com/phase2/particle/tree/release/9.x) - a starter set of files for Drupal theming that includes a Twig powered Pattern Lab and beginning Sass \u0026 other front end tools. Uses `p2-theme-core` for automation.\n- [`p2-theme-core`](https://github.com/phase2/p2-theme-core) (this repo) - the core gulp tasks that handles most of the theme's automation.\n\n# Phase2 Theme Core\n\nIdeally, the changes to how a theme install works would be done by passing in a different `config.js`.\n\n**More docs in [`docs/`](https://github.com/phase2/p2-theme-core/tree/master/docs) folder – these docs are [hosted in Read the Docs](http://p2-theme-core.readthedocs.org)!**\n\n# Features\n\n- Scss =\u003e CSS compiling with Libsass, PostCSS, linting, and SourceMaps\n- Pattern Lab Twig compiling \u0026 BrowserSync live reload and style injection\n- SVG =\u003e Font Icons compiling with support for adding mixins and classes to Scss along with a demo page in Pattern Lab\n- JS compiling via Babel, linting and aggregation\n- WebPack module bundling\n- Drupal file watching to trigger Drush cache clears\n\nAll is easily configurable by changing values in your `config.js` file in your project. These values are merged into the `config.default.js` file - look there for the available options and defaults.\n\n# Installation\n\nIt's best to look at how [`pattern-lab-starter`](https://github.com/phase2/pattern-lab-starter) implements this, but it's basically this:\n\n    npm install p2-theme-core --save\n    cp node_modules/p2-theme-core/config.default.js gulpconfig.js\n\nMake a `gulpfile.js` with:\n\n```js\n'use strict';\nvar gulp = require('gulp');\nvar config = require('./gulpconfig.js');\nvar tasks = {\n  'compile': [],\n  'watch': [],\n  'validate': [],\n  'clean': [],\n  'default': []\n};\n\nrequire('p2-theme-core')(gulp, config, tasks);\n\ngulp.task('clean', gulp.parallel(tasks.clean));\ngulp.task('compile', gulp.series(\n  'clean',\n  gulp.parallel(tasks.compile)\n));\ngulp.task('validate', gulp.parallel(tasks.validate));\ngulp.task('watch', gulp.parallel(tasks.watch));\ntasks.default.push('watch');\ngulp.task('default', gulp.series(\n  'compile',\n  gulp.parallel(tasks.default)\n));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphase2%2Fp2-theme-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphase2%2Fp2-theme-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphase2%2Fp2-theme-core/lists"}