-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add config directory #330
base: master
Are you sure you want to change the base?
Add config directory #330
Conversation
tasks/scaffold.js
Outdated
grunt.config(['symlink', 'config'], { | ||
src: '<%= config.srcPaths.drupal %>/config', | ||
dest: drupal.configPath() | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code works just fine, but it does read as out of order to add the task before defining it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
test/build.js
Outdated
var src = fs.existsSync('src/config'); | ||
if (src) { | ||
fs.existsSync('build/html/config', function(exists) { | ||
assert.ok(exists); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm fuzzy on this, but if we have a test where the src/config doesn't exist, we should confirm the build/html/config doesn't exist. If we don't, why include the check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
Does this deprecate #323? |
84c6416
to
4e486b6
Compare
test/build.js
Outdated
done(); | ||
} else if (html && !src) { | ||
assert.ok(false, 'Error: build/html/config exists but src/config does not'); | ||
done(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the thoroughness here. Do we have Drupal 7 test cases executing that won't have the config directory? If so, that seems like it deserves a separate test case.
Re-triggering travis tests. |
…e exists at 'src/config' * Adding documentation to 10_BUILD.md in reference to the config directory. * Updating the test (build.js) to use fs.existsSync for my test * Reorder task/definition, Rewrite the test for the config directories * Add a test case for both Drupal 8 & 7
4e486b6
to
76c20a9
Compare
it('config directory should exist if provided ', function(done) { | ||
var src = fs.existsSync('src/config'); | ||
var html = fs.existsSync('build/html/config'); | ||
if (drupalCore === '8') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe strict equality is fine here based on what I'm seeing here:
Setting environment variables from .travis.yml
$ export NVM_NODE_VERSION="4"
$ export GDT_DRUPAL_CORE="7"
@grayside added a couple checks for D8 and D7 to the tests https://github.com/phase2/grunt-drupal-tasks/pull/330/files#diff-2574f2eb25909e68dd1489311fbcd115 |
No description provided.