Skip to content

Commit 0d2e2dd

Browse files
author
Callin Mullaney
committed
Revert "Merge pull request #7 from emulsify-ds/release-emulsify-core-4"
This reverts commit 7bb4425, reversing changes made to 3e25aab.
1 parent 7bb4425 commit 0d2e2dd

34 files changed

Lines changed: 216 additions & 537 deletions

.cli/init.js

Lines changed: 2 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -116,67 +116,6 @@ const applyToYmlFile = (filePath, functor) => {
116116
fs.writeFileSync(filePath, yaml.dump(functor(file)));
117117
};
118118

119-
/**
120-
* Loads a JSON file, applies the functor to its parsed contents, and writes it.
121-
*
122-
* @param {string} filePath path to the JSON file.
123-
* @param {fn} functor fn that should return the new JSON object.
124-
* @returns void.
125-
*/
126-
const applyToJsonFile = (filePath, functor) => {
127-
if (!filePath || typeof filePath !== `string`) {
128-
throw new Error(
129-
`Cannot modify a file without knowing how to access it: ${filePath}`,
130-
);
131-
}
132-
if (typeof functor !== 'function') {
133-
return;
134-
}
135-
136-
const file = JSON.parse(fs.readFileSync(filePath, 'utf8'));
137-
fs.writeFileSync(filePath, `${JSON.stringify(functor(file), null, 2)}\n`);
138-
};
139-
140-
/**
141-
* Updates the generated theme settings schema key after the schema file is
142-
* renamed from the template machine name to the project machine name.
143-
*
144-
* @param {string} filePath path to the schema yml file.
145-
* @param {string} machineName generated theme machine name.
146-
* @returns void.
147-
*/
148-
const updateSchemaFile = (filePath, machineName) => {
149-
applyToYmlFile(filePath, (schema) => {
150-
const templateKey = 'emulsify.settings';
151-
const generatedKey = `${machineName}.settings`;
152-
153-
if (!schema[templateKey]) {
154-
return schema;
155-
}
156-
157-
if (templateKey === generatedKey) {
158-
return {
159-
...schema,
160-
[templateKey]: {
161-
...schema[templateKey],
162-
label: `${machineName} settings`,
163-
},
164-
};
165-
}
166-
167-
const updatedSchema = {
168-
...schema,
169-
[generatedKey]: {
170-
...schema[templateKey],
171-
label: `${machineName} settings`,
172-
},
173-
};
174-
delete updatedSchema[templateKey];
175-
176-
return updatedSchema;
177-
});
178-
};
179-
180119
const main = () => {
181120
// Load up config file, throw if none exists.
182121
const config = getEmulsifyConfig();
@@ -209,7 +148,7 @@ const main = () => {
209148
},
210149
{
211150
from: '../config/install/emulsify.settings.yml',
212-
to: `../config/install/${machineName}.settings.yml`,
151+
to: `../config/install/${machineName}.settings.yml'`,
213152
},
214153
{
215154
from: '../config/schema/emulsify.schema.yml',
@@ -222,21 +161,11 @@ const main = () => {
222161
path.join(_dirname, `../${machineName}.info.yml`),
223162
(info) => ({
224163
...info,
225-
name,
164+
name: machineName,
226165
libraries: info.libraries.map(strReplaceEmulsify(machineName)),
227166
}),
228167
);
229168

230-
updateSchemaFile(
231-
path.join(_dirname, `../config/schema/${machineName}.schema.yml`),
232-
machineName,
233-
);
234-
235-
applyToJsonFile(path.join(_dirname, '../package.json'), (packageJson) => ({
236-
...packageJson,
237-
name: machineName,
238-
}));
239-
240169
// Update breakpoint.yml file.
241170
applyToYmlFile(
242171
path.join(_dirname, `../${machineName}.breakpoints.yml`),

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
scripts-prepend-node-path=true

README.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,17 @@
22

33
# Emulsify Drupal Starter
44

5-
**Emulsify Drupal Starter** is the Drupal theme scaffold installed by the Emulsify CLI. It lets teams create an installable Emulsify child theme in a separate Git repository and build the theme outside of a Drupal installation.
6-
7-
This starter is aligned with the current Whisk starter from the Emulsify Drupal base theme. Generated themes target Drupal `^11.3 || ^12`, use Emulsify Core 4, and run Storybook plus theme asset builds through Vite.
5+
**Emulsify Drupal Starter** is a scaffolding repository for the Emulsify CLI. It creates an installable Drupal theme.
86

97
## Documentation
108

119
[Emulsify CLI Usage](https://www.emulsify.info/docs/supporting-projects/emulsify-cli/emulsify-cli-usage)
1210

13-
## Requirements
14-
15-
- Node.js `>=24`
16-
- Drupal `^11.3 || ^12`
17-
- [Emulsify Drupal base theme](https://www.drupal.org/project/emulsify)
18-
- `drupal/emulsify_tools:^2.0`
19-
2011
### Installation
2112

2213
`emulsify init --platform drupal <name>`
2314

24-
The generated theme is configured as a child theme of the Emulsify Drupal base theme and includes the matching favicon settings schema, Storybook configuration, and Vite-based build scripts.
25-
26-
### Local Development
27-
28-
- `npm run build` builds the theme assets with Vite.
29-
- `npm run develop` runs Vite in watch mode alongside Storybook.
30-
- `npm run storybook-build` builds static Storybook output.
15+
**Note:** Installing a customized Emulsify Drupal theme requires the [Emulsify base theme](https://www.drupal.org/project/emulsify).
3116

3217

3318
## Demo

assets/icons/angle-down.svg

Lines changed: 6 additions & 0 deletions
Loading

assets/icons/arrowRight.svg

Lines changed: 1 addition & 0 deletions
Loading

assets/icons/chevron-down.svg

Lines changed: 4 additions & 0 deletions
Loading

assets/icons/circle-info.svg

Lines changed: 4 additions & 0 deletions
Loading

assets/icons/facebook.svg

Lines changed: 4 additions & 0 deletions
Loading

assets/icons/instagram.svg

Lines changed: 4 additions & 0 deletions
Loading

assets/icons/linkedin.svg

Lines changed: 5 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)