@newlogic-digital/core 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -97,6 +97,10 @@ const plugin = async (options = {}) => {
97
97
  const tailwindcss = (await import('@tailwindcss/vite')).default
98
98
 
99
99
  optionalPlugins.push(tailwindcss(options.tailwindcss))
100
+
101
+ if (!fs.existsSync(resolve(process.cwd(), 'src/+.css'))) {
102
+ fs.writeFileSync(resolve(process.cwd(), 'src/+.css'), '@import "./styles/main.css";')
103
+ }
100
104
  }
101
105
 
102
106
  if (options.cssInline.paths.length > 0) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newlogic-digital/core",
3
3
  "type": "module",
4
- "version": "4.0.0",
4
+ "version": "4.0.2",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "newlogic-core": "./bin/newlogic-core.js"
@@ -27,8 +27,8 @@
27
27
  "browserslist": "^4.28.1",
28
28
  "browserslist-to-esbuild": "^2.1.1",
29
29
  "lightningcss": "^1.32.0",
30
- "npm-check-updates": "^19.6.5",
31
- "oxlint": "^1.56.0",
30
+ "npm-check-updates": "^19.6.6",
31
+ "oxlint": "^1.57.0",
32
32
  "stylelint-config-standard": "^40.0.0",
33
33
  "vituum": "^2.0.1"
34
34
  },
@@ -46,9 +46,11 @@
46
46
  }
47
47
  },
48
48
  "devDependencies": {
49
+ "@tailwindcss/vite": "^4.2.2",
49
50
  "@types/node": "^25.5",
50
- "rolldown": "^1.0.0-rc.10",
51
- "typescript": "^5"
51
+ "@vituum/vite-plugin-twig": "^2.0.1",
52
+ "rolldown": "^1.0.0-rc.12",
53
+ "typescript": "^6"
52
54
  },
53
55
  "files": [
54
56
  "bin",
@@ -46,7 +46,8 @@ if (!projectRoot || projectRoot === packageRoot || !fs.existsSync(sourceSkillsDi
46
46
 
47
47
  const targetAgentsDir = path.join(projectRoot, '.agents')
48
48
  const targetSkillsDir = path.join(targetAgentsDir, 'skills')
49
- const targetClaudePath = path.join(projectRoot, '.claude')
49
+ const targetClaudeDir = path.join(projectRoot, '.claude')
50
+ const targetClaudeSkillsDir = path.join(targetClaudeDir, 'skills')
50
51
  const skillEntries = fs.readdirSync(sourceSkillsDir, { withFileTypes: true })
51
52
  .filter(entry => entry.isDirectory())
52
53
 
@@ -57,7 +58,7 @@ if (skillEntries.length === 0) {
57
58
  fs.mkdirSync(targetSkillsDir, { recursive: true })
58
59
 
59
60
  let linkedCount = 0
60
- let linkedClaudeDir = false
61
+ let linkedClaudeSkillsDir = false
61
62
 
62
63
  for (const entry of skillEntries) {
63
64
  const sourcePath = path.join(sourceSkillsDir, entry.name)
@@ -81,27 +82,39 @@ for (const entry of skillEntries) {
81
82
  linkedCount += 1
82
83
  }
83
84
 
84
- const claudeStat = getExistingTargetStat(targetClaudePath)
85
+ const claudeStat = getExistingTargetStat(targetClaudeDir)
86
+ let shouldLinkClaudeSkillsDir = true
85
87
 
86
- if (claudeStat) {
87
- if (!claudeStat.isSymbolicLink()) {
88
- console.warn(`${styleText(['cyan', 'bold'], name)} ${styleText('yellow', `Skipping ".claude" because "${targetClaudePath}" already exists and is not a symlink.`)}`)
88
+ if (claudeStat?.isSymbolicLink()) {
89
+ console.warn(`${styleText(['cyan', 'bold'], name)} ${styleText('yellow', `Skipping "${targetClaudeSkillsDir}" because "${targetClaudeDir}" already exists as a symlink. Remove "${targetClaudeDir}" and run the command again.`)}`)
90
+ shouldLinkClaudeSkillsDir = false
91
+ }
92
+
93
+ if (shouldLinkClaudeSkillsDir) {
94
+ fs.mkdirSync(targetClaudeDir, { recursive: true })
95
+
96
+ const claudeSkillsStat = getExistingTargetStat(targetClaudeSkillsDir)
97
+
98
+ if (claudeSkillsStat) {
99
+ if (!claudeSkillsStat.isSymbolicLink()) {
100
+ console.warn(`${styleText(['cyan', 'bold'], name)} ${styleText('yellow', `Skipping "${targetClaudeSkillsDir}" because it already exists and is not a symlink.`)}`)
101
+ }
102
+ else if (!isSameSymlinkTarget(targetClaudeSkillsDir, targetSkillsDir)) {
103
+ fs.unlinkSync(targetClaudeSkillsDir)
104
+ createDirectorySymlink(targetSkillsDir, targetClaudeSkillsDir)
105
+ linkedClaudeSkillsDir = true
106
+ }
89
107
  }
90
- else if (!isSameSymlinkTarget(targetClaudePath, targetAgentsDir)) {
91
- fs.unlinkSync(targetClaudePath)
92
- createDirectorySymlink(targetAgentsDir, targetClaudePath)
93
- linkedClaudeDir = true
108
+ else {
109
+ createDirectorySymlink(targetSkillsDir, targetClaudeSkillsDir)
110
+ linkedClaudeSkillsDir = true
94
111
  }
95
112
  }
96
- else {
97
- createDirectorySymlink(targetAgentsDir, targetClaudePath)
98
- linkedClaudeDir = true
99
- }
100
113
 
101
114
  if (linkedCount > 0) {
102
115
  console.info(`${styleText(['cyan', 'bold'], name)} ${styleText('green', `Linked ${linkedCount} skill${linkedCount === 1 ? '' : 's'} into "${targetSkillsDir}".`)}`)
103
116
  }
104
117
 
105
- if (linkedClaudeDir) {
106
- console.info(`${styleText(['cyan', 'bold'], name)} ${styleText('green', `Linked "${targetClaudePath}" to "${targetAgentsDir}".`)}`)
118
+ if (linkedClaudeSkillsDir) {
119
+ console.info(`${styleText(['cyan', 'bold'], name)} ${styleText('green', `Linked "${targetClaudeSkillsDir}" to "${targetSkillsDir}".`)}`)
107
120
  }